rust: Visibility exports for bindgen

We are now default restricting bindgen visibility to subpackages. This
change is part of a set of changes adding explicit visibility for
bindgen libraries which are already being used elsewhere.

* If these visibility rules are to allow access by the safe bindings
  library which lives elsewhere in the codebase, no action is needed.
* If safe bindings do not exist, and you own this library, now is a good
  time to think about producing them and transitioning your (now
  enumerated) client list.
* If safe bindings exist, but there is a surprise client of the raw
  bindings on this list, now is a good time to talk to them about why
  they don't want to use your safe bindings.

Bug: 166332519
Test: m
Change-Id: I967811c6cf563725d591e1d8536f7c6e19535996
This commit is contained in:
Matthew Maurer 2022-07-29 08:49:29 -07:00
parent ef1f345fc9
commit 5e71873288

View file

@ -233,6 +233,7 @@ rust_bindgen {
name: "libselinux_bindgen",
wrapper_src: "rust/selinux.h",
crate_name: "selinux_bindgen",
visibility: ["//frameworks/native/libs/binder/rust/tests", "//system/security/keystore2:__subpackages__", "//packages/modules/Virtualization/virtualizationservice"],
source_stem: "bindings",
local_include_dirs: ["include"],