1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_library_rlib {
6    name: "libcstr",
7    crate_name: "cstr",
8    defaults: ["avf_build_flags_rust"],
9    srcs: ["src/lib.rs"],
10    edition: "2021",
11    host_supported: true,
12    prefer_rlib: true,
13    target: {
14        android: {
15            no_stdlibs: true,
16            stdlibs: [
17                "libcompiler_builtins.rust_sysroot",
18                "libcore.rust_sysroot",
19            ],
20        },
21    },
22    apex_available: [
23        "//apex_available:platform",
24        "//apex_available:anyapex",
25    ],
26}
27
28rust_test {
29    name: "libcstr.tests",
30    crate_name: "libcstr_test",
31    defaults: ["avf_build_flags_rust"],
32    srcs: ["src/lib.rs"],
33    test_suites: ["general-tests"],
34    prefer_rlib: true,
35    rustlibs: ["libcstr"],
36}
37