• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "system_bt_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["system_bt_license"],
8}
9
10rust_ffi {
11    name: "librootcanal_rs",
12    host_supported: true,
13    vendor_available: true,
14    crate_name: "rootcanal_rs",
15    srcs: [
16        "src/lib.rs",
17        ":rootcanal_lmp_packets_rust_gen",
18        ":rootcanal_hci_packets_rust_gen",
19    ],
20    edition: "2018",
21    proc_macros: ["libnum_derive"],
22    rustlibs: [
23        "libbytes",
24        "libnum_bigint",
25        "libnum_integer",
26        "libnum_traits",
27        "libpin_utils",
28        "librand",
29        "libthiserror",
30    ],
31    include_dirs: ["include"],
32}
33
34genrule {
35    name: "rootcanal_lmp_packets_rust_gen",
36    defaults: ["pdl_rust_generator_defaults"],
37    srcs: ["lmp_packets.pdl"],
38    out: ["lmp_packets.rs"],
39}
40
41rust_test_host {
42    name: "rootcanal_rs_test",
43    crate_name: "rootcanal_rs",
44    srcs: [
45        "src/lib.rs",
46        ":rootcanal_lmp_packets_rust_gen",
47        ":rootcanal_hci_packets_rust_gen",
48    ],
49    auto_gen_config: true,
50    edition: "2018",
51    proc_macros: [
52        "libnum_derive",
53        "libpaste",
54    ],
55    rustlibs: [
56        "libbt_packets",
57        "libbytes",
58        "libnum_bigint",
59        "libnum_integer",
60        "libnum_traits",
61        "libpin_utils",
62        "librand",
63        "libthiserror",
64    ],
65}
66