package { default_applicable_licenses: ["Android-Apache-2.0"], } rust_bindgen { name: "libcap_bindgen", defaults: ["avf_build_flags_rust"], edition: "2021", wrapper_src: "bindgen/libcap.h", crate_name: "cap_bindgen", source_stem: "bindings", shared_libs: ["libcap"], bindgen_flags: [ "--default-enum-style rust", ], visibility: [ "//packages/modules/Virtualization:__subpackages__", ], } rust_test { name: "libcap_bindgen_test", srcs: [":libcap_bindgen"], defaults: ["avf_build_flags_rust"], crate_name: "cap_bindgen_test", test_suites: ["general-tests"], auto_gen_config: true, clippy_lints: "none", lints: "none", } rust_defaults { name: "libcap_rust.defaults", crate_name: "cap", defaults: ["avf_build_flags_rust"], srcs: ["src/caps.rs"], rustlibs: [ "libanyhow", "libcap_bindgen", "liblibc", "libnix", "libscopeguard", ], edition: "2021", prefer_rlib: true, multilib: { lib32: { enabled: false, }, }, shared_libs: [ "libcap", ], } rust_library { name: "libcap_rust", defaults: ["libcap_rust.defaults"], } rust_test { name: "libcap_rust.test", defaults: ["libcap_rust.defaults"], test_suites: ["general-tests"], }