rust: Rust is now GA for platform usage
Rust is now approved for general platform use without project-specific
review.
Bug: 240501326
Test: m
Change-Id: I6fd4c22ba2c6a3a5bac6f91fd087fe5cffe46c01
diff --git a/rust/OWNERS b/rust/OWNERS
index ddaebc5..b595511 100644
--- a/rust/OWNERS
+++ b/rust/OWNERS
@@ -1,5 +1,2 @@
# Additional owner/reviewers for rust rules, including parent directory owners.
per-file * = chiw@google.com, chriswailes@google.com, ivanlozano@google.com, jeffv@google.com, mmaurer@google.com, srhines@google.com
-
-# Limited owners/reviewers of the allowed list.
-per-file allowed_list.go = chiw@google.com, chriswailes@google.com, ivanlozano@google.com, jeffv@google.com, mmaurer@google.com, srhines@google.com
diff --git a/rust/config/Android.bp b/rust/config/Android.bp
index ba40cb0..be73d69 100644
--- a/rust/config/Android.bp
+++ b/rust/config/Android.bp
@@ -16,7 +16,6 @@
"global.go",
"lints.go",
"toolchain.go",
- "allowed_list.go",
"darwin_host.go",
"x86_linux_bionic_host.go",
"x86_linux_host.go",
diff --git a/rust/config/allowed_list.go b/rust/config/allowed_list.go
deleted file mode 100644
index 9129b0e..0000000
--- a/rust/config/allowed_list.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package config
-
-var (
- // When adding a new path below, add a rustfmt.toml file at the root of
- // the repository and enable the rustfmt repo hook. See aosp/1458238
- // for an example.
- // TODO(b/160223496): enable rustfmt globally.
- RustAllowedPaths = []string{
- "device/google/cuttlefish",
- "external/adhd",
- "external/boringssl",
- "external/crosvm",
- "external/libchromeos-rs",
- "external/minijail",
- "external/open-dice",
- "external/rust",
- "external/selinux/libselinux",
- "external/uwb",
- "external/vm_tools/p9",
- "frameworks/native/libs/binder/rust",
- "frameworks/proto_logging/stats",
- "hardware/interfaces/security",
- "hardware/interfaces/uwb",
- "packages/modules/Bluetooth",
- "packages/modules/DnsResolver",
- "packages/modules/Uwb",
- "packages/modules/Virtualization",
- "platform_testing/tests/codecoverage/native/rust",
- "prebuilts/rust",
- "system/core/debuggerd/rust",
- "system/core/libstats/pull_rust",
- "system/core/trusty/libtrusty-rs",
- "system/core/trusty/keymint",
- "system/extras/profcollectd",
- "system/extras/simpleperf",
- "system/hardware/interfaces/keystore2",
- "system/keymint",
- "system/librustutils",
- "system/logging/liblog",
- "system/logging/rust",
- "system/nfc",
- "system/security",
- "system/tools/aidl",
- "tools/security/fuzzing/example_rust_fuzzer",
- "tools/security/fuzzing/orphans",
- "tools/security/remote_provisioning/cert_validator",
- "tools/vendor",
- "vendor/",
- }
-
- DownstreamRustAllowedPaths = []string{
- // Add downstream allowed Rust paths here.
- }
-
- RustModuleTypes = []string{
- // Don't add rust_bindgen or rust_protobuf as these are code generation modules
- // and can be expected to be in paths without Rust code.
- "rust_benchmark",
- "rust_benchmark_host",
- "rust_binary",
- "rust_binary_host",
- "rust_library",
- "rust_library_dylib",
- "rust_library_rlib",
- "rust_ffi",
- "rust_ffi_shared",
- "rust_ffi_static",
- "rust_fuzz",
- "rust_library_host",
- "rust_library_host_dylib",
- "rust_library_host_rlib",
- "rust_ffi_host",
- "rust_ffi_host_shared",
- "rust_ffi_host_static",
- "rust_proc_macro",
- "rust_test",
- "rust_test_host",
- }
-)
diff --git a/rust/rust.go b/rust/rust.go
index d5d4929..4d9fe4c 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -33,13 +33,6 @@
var pctx = android.NewPackageContext("android/soong/rust")
func init() {
- // Only allow rust modules to be defined for certain projects
-
- android.AddNeverAllowRules(
- android.NeverAllow().
- NotIn(append(config.RustAllowedPaths, config.DownstreamRustAllowedPaths...)...).
- ModuleType(config.RustModuleTypes...))
-
android.RegisterModuleType("rust_defaults", defaultsFactory)
android.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
ctx.BottomUp("rust_libraries", LibraryMutator).Parallel()