blob: 135f4d46dec97ba59e9cdde4a2d7af36eb78e79c [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: [
Victor Hsieh6fb8b252021-12-03 16:30:04 -080010 "libanyhow",
Alan Stokes14f07392021-09-27 14:03:31 +010011 "libcxx",
Victor Hsieh6fb8b252021-12-03 16:30:04 -080012 "liblibc",
Alan Stokes14f07392021-09-27 14:03:31 +010013 ],
14 static_libs: [
15 "libcomposd_native_cpp",
16 ],
Victor Hsieh6fb8b252021-12-03 16:30:04 -080017 shared_libs: [
18 "libartpalette-system",
19 "libcrypto",
20 ],
Alan Stokes14f07392021-09-27 14:03:31 +010021 apex_available: ["com.android.compos"],
22}
23
24cc_library_static {
25 name: "libcomposd_native_cpp",
26 srcs: ["composd_native.cpp"],
27 shared_libs: ["libcrypto"],
28 generated_headers: ["composd_native_header"],
29 generated_sources: ["composd_native_code"],
30 apex_available: ["com.android.compos"],
31}
32
33genrule {
34 name: "composd_native_code",
35 tools: ["cxxbridge"],
36 cmd: "$(location cxxbridge) $(in) >> $(out)",
37 srcs: ["lib.rs"],
38 out: ["composd_native_cxx_generated.cc"],
39}
40
41genrule {
42 name: "composd_native_header",
43 tools: ["cxxbridge"],
44 cmd: "$(location cxxbridge) $(in) --header >> $(out)",
45 srcs: ["lib.rs"],
46 out: ["lib.rs.h"],
47}