1cc_defaults { 2 name: "libgrpcio_sys_defaults", 3 cflags: [ 4 "-DGRPC_SYS_SECURE", 5 ], 6 shared_libs: ["libgrpc++"], 7 apex_available: [ 8 "//apex_available:anyapex", 9 "//apex_available:platform", 10 "com.android.btservices", 11 ], 12 product_available: true, 13 vendor_available: true, 14 min_sdk_version: "29", 15} 16 17cc_library { 18 name: "libgrpc_wrap", 19 defaults: ["libgrpcio_sys_defaults"], 20 host_supported: true, 21 srcs: ["grpc_wrap.cc"], 22} 23 24rust_bindgen { 25 name: "libgrpc_bindgen", 26 defaults: ["libgrpcio_sys_defaults"], 27 host_supported: true, 28 wrapper_src: "android/bindgen_wrapper.hpp", 29 source_stem: "grpc-bindings", 30 crate_name: "grpc_bindgen", 31 bindgen_flags: [ 32 "--constified-enum-module grpc_status_code", 33 "--default-enum-style rust", 34 "--allowlist-function=\\bgrpc_.*", 35 "--allowlist-function=\\bgpr_.*", 36 "--allowlist-function=\\bgrpcwrap_.*", 37 "--allowlist-var=\\bGRPC_.*", 38 "--allowlist-type=\\bgrpc_.*", 39 "--allowlist-type=\\bgpr_.*", 40 "--allowlist-type=\\bgrpcwrap_.*", 41 "--allowlist-type=\\bcensus_context.*", 42 "--allowlist-type=\\bverify_peer_options.*", 43 "--blocklist-type=(__)?pthread.*", 44 "--blocklist-function=\\bgpr_mu_.*", 45 "--blocklist-function=\\bgpr_cv_.*", 46 "--blocklist-function=\\bgpr_once_.*", 47 "--blocklist-type=gpr_mu", 48 "--blocklist-type=gpr_cv", 49 "--blocklist-type=gpr_once", 50 ], 51 min_sdk_version: "29", 52} 53 54rust_test { 55 name: "libgrpc_bindgen_test", 56 srcs: [":libgrpc_bindgen"], 57 crate_name: "grpc_bindgen_test", 58 test_suites: ["general-tests"], 59 auto_gen_config: true, 60 clippy_lints: "none", 61 lints: "none", 62} 63