| // This file is generated by cargo_embargo. |
| // Do not modify this file because the changes will be overridden on upgrade. |
| |
| package { |
| default_applicable_licenses: ["external_rust_crates_grpcio-sys_license"], |
| default_team: "trendy_team_android_rust", |
| } |
| |
| license { |
| name: "external_rust_crates_grpcio-sys_license", |
| visibility: [":__subpackages__"], |
| license_kinds: ["SPDX-license-identifier-Apache-2.0"], |
| license_text: ["LICENSE"], |
| } |
| |
| rust_library { |
| name: "libgrpcio_sys", |
| host_supported: true, |
| crate_name: "grpcio_sys", |
| cargo_env_compat: true, |
| cargo_pkg_version: "0.13.0+1.56.2-patched", |
| crate_root: "src/lib.rs", |
| srcs: [":libgrpc_bindgen"], |
| edition: "2018", |
| features: [ |
| "_gen-bindings", |
| "_libz-sys", |
| "_secure", |
| "bindgen", |
| "boringssl", |
| "boringssl-src", |
| "libz-sys", |
| ], |
| rustlibs: [ |
| "liblibc", |
| "liblibz_sys", |
| ], |
| apex_available: [ |
| "//apex_available:platform", |
| "//apex_available:anyapex", |
| ], |
| product_available: true, |
| vendor_available: true, |
| min_sdk_version: "29", |
| shared_libs: [ |
| "libgrpc++", |
| "libgrpc_wrap", |
| ], |
| |
| } |
| |
| cc_defaults { |
| name: "libgrpcio_sys_defaults", |
| cflags: [ |
| "-DGRPC_SYS_SECURE", |
| ], |
| shared_libs: ["libgrpc++"], |
| apex_available: [ |
| "//apex_available:anyapex", |
| "//apex_available:platform", |
| "com.android.bt", |
| ], |
| product_available: true, |
| vendor_available: true, |
| min_sdk_version: "29", |
| } |
| |
| cc_library { |
| name: "libgrpc_wrap", |
| defaults: ["libgrpcio_sys_defaults"], |
| host_supported: true, |
| srcs: ["grpc_wrap.cc"], |
| } |
| |
| rust_bindgen { |
| name: "libgrpc_bindgen", |
| defaults: ["libgrpcio_sys_defaults"], |
| host_supported: true, |
| wrapper_src: "android/bindgen_wrapper.hpp", |
| source_stem: "grpc-bindings", |
| crate_name: "grpc_bindgen", |
| bindgen_flags: [ |
| "--constified-enum-module grpc_status_code", |
| "--default-enum-style rust", |
| "--allowlist-function=\\bgrpc_.*", |
| "--allowlist-function=\\bgpr_.*", |
| "--allowlist-function=\\bgrpcwrap_.*", |
| "--allowlist-var=\\bGRPC_.*", |
| "--allowlist-type=\\bgrpc_.*", |
| "--allowlist-type=\\bgpr_.*", |
| "--allowlist-type=\\bgrpcwrap_.*", |
| "--allowlist-type=\\bcensus_context.*", |
| "--allowlist-type=\\bverify_peer_options.*", |
| "--blocklist-type=(__)?pthread.*", |
| "--blocklist-function=\\bgpr_mu_.*", |
| "--blocklist-function=\\bgpr_cv_.*", |
| "--blocklist-function=\\bgpr_once_.*", |
| "--blocklist-type=gpr_mu", |
| "--blocklist-type=gpr_cv", |
| "--blocklist-type=gpr_once", |
| ], |
| min_sdk_version: "29", |
| } |
| |
| rust_test { |
| name: "libgrpc_bindgen_test", |
| srcs: [":libgrpc_bindgen"], |
| crate_name: "grpc_bindgen_test", |
| test_suites: ["general-tests"], |
| auto_gen_config: true, |
| clippy_lints: "none", |
| lints: "none", |
| } |