blob: ad0afd9c15184ed1d96cc3a69d015feab374d3fb [file] [log] [blame]
Alan Stokes14f07392021-09-27 14:03:31 +01001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_library {
6 name: "libcomposd_native_rust",
7 crate_name: "composd_native",
8 srcs: ["lib.rs"],
9 rustlibs: [
10 "libcxx",
11 ],
12 static_libs: [
13 "libcomposd_native_cpp",
14 ],
15 shared_libs: ["libcrypto"],
16 apex_available: ["com.android.compos"],
17}
18
19cc_library_static {
20 name: "libcomposd_native_cpp",
21 srcs: ["composd_native.cpp"],
22 shared_libs: ["libcrypto"],
23 generated_headers: ["composd_native_header"],
24 generated_sources: ["composd_native_code"],
25 apex_available: ["com.android.compos"],
26}
27
28genrule {
29 name: "composd_native_code",
30 tools: ["cxxbridge"],
31 cmd: "$(location cxxbridge) $(in) >> $(out)",
32 srcs: ["lib.rs"],
33 out: ["composd_native_cxx_generated.cc"],
34}
35
36genrule {
37 name: "composd_native_header",
38 tools: ["cxxbridge"],
39 cmd: "$(location cxxbridge) $(in) --header >> $(out)",
40 srcs: ["lib.rs"],
41 out: ["lib.rs.h"],
42}