1package config 2 3var ( 4 // When adding a new path below, add a rustfmt.toml file at the root of 5 // the repository and enable the rustfmt repo hook. See aosp/1458238 6 // for an example. 7 // TODO(b/160223496): enable rustfmt globally. 8 RustAllowedPaths = []string{ 9 "device/google/cuttlefish", 10 "external/adhd", 11 "external/boringssl", 12 "external/crosvm", 13 "external/libchromeos-rs", 14 "external/minijail", 15 "external/open-dice", 16 "external/rust", 17 "external/selinux/libselinux", 18 "external/uwb", 19 "external/vm_tools/p9", 20 "frameworks/native/libs/binder/rust", 21 "frameworks/proto_logging/stats", 22 "hardware/interfaces/security", 23 "hardware/interfaces/uwb", 24 "packages/modules/Bluetooth", 25 "packages/modules/DnsResolver", 26 "packages/modules/Uwb", 27 "packages/modules/Virtualization", 28 "platform_testing/tests/codecoverage/native/rust", 29 "prebuilts/rust", 30 "system/core/debuggerd/rust", 31 "system/core/libstats/pull_rust", 32 "system/core/trusty/libtrusty-rs", 33 "system/extras/profcollectd", 34 "system/extras/simpleperf", 35 "system/hardware/interfaces/keystore2", 36 "system/librustutils", 37 "system/logging/liblog", 38 "system/logging/rust", 39 "system/nfc", 40 "system/security", 41 "system/tools/aidl", 42 "tools/security/fuzzing/example_rust_fuzzer", 43 "tools/security/fuzzing/orphans", 44 "tools/security/remote_provisioning/cert_validator", 45 "tools/vendor", 46 "vendor/", 47 } 48 49 DownstreamRustAllowedPaths = []string{ 50 // Add downstream allowed Rust paths here. 51 } 52 53 RustModuleTypes = []string{ 54 // Don't add rust_bindgen or rust_protobuf as these are code generation modules 55 // and can be expected to be in paths without Rust code. 56 "rust_benchmark", 57 "rust_benchmark_host", 58 "rust_binary", 59 "rust_binary_host", 60 "rust_library", 61 "rust_library_dylib", 62 "rust_library_rlib", 63 "rust_ffi", 64 "rust_ffi_shared", 65 "rust_ffi_static", 66 "rust_fuzz", 67 "rust_library_host", 68 "rust_library_host_dylib", 69 "rust_library_host_rlib", 70 "rust_ffi_host", 71 "rust_ffi_host_shared", 72 "rust_ffi_host_static", 73 "rust_proc_macro", 74 "rust_test", 75 "rust_test_host", 76 } 77) 78