blob: 31ec3f12c6bdfdc15eb288da12da9b989078e905 [file] [log] [blame]
Ivan Lozanoe169ad72019-09-18 08:42:54 -07001package config
2
3var (
Thiébaud Weksteen425a5422020-08-06 20:20:19 +02004 // When adding a new path below, add a rustfmt.toml file at the root of
Andrew Scull5a58bca2020-10-13 13:49:29 +01005 // the repository and enable the rustfmt repo hook. See aosp/1458238
Thiébaud Weksteen425a5422020-08-06 20:20:19 +02006 // for an example.
7 // TODO(b/160223496): enable rustfmt globally.
Ivan Lozanoe169ad72019-09-18 08:42:54 -07008 RustAllowedPaths = []string{
A. Cody Schuffelen4e5fc3b2020-11-25 18:29:39 -08009 "device/google/cuttlefish",
Alistair Delvae172eaf2020-10-21 06:56:13 -070010 "external/adhd",
11 "external/crosvm",
Victor Hsieh274597b2020-12-03 16:08:43 -080012 "external/libchromeos-rs",
Lingfeng Yang0f8c5b42020-02-20 07:27:15 -080013 "external/minijail",
Chih-Hung Hsiehc74d7232019-10-25 10:01:42 -070014 "external/rust",
Alistair Delvaea2974c2020-10-21 06:56:58 -070015 "external/vm_tools/p9",
Stephen Cranefb67ab52020-05-06 14:28:21 -070016 "frameworks/native/libs/binder/rust",
Joel Galenson77a684e2021-02-17 11:22:38 -080017 "frameworks/proto_logging/stats",
Bernie Innocenti3a710d62020-12-05 02:55:53 +090018 "packages/modules/DnsResolver",
Andrew Scullaf2015d2020-10-13 11:42:28 +010019 "packages/modules/Virtualization",
Matthew Maurer99020b02019-10-31 10:44:40 -070020 "prebuilts/rust",
Qasim Javedd271ada2020-10-28 13:40:05 -070021 "system/bt",
Joel Galensonf4b139a2021-03-30 13:39:45 -070022 "system/core/libstats/pull_rust",
Yi Kong91c3e4e2020-08-05 01:03:05 +080023 "system/extras/profcollectd",
Yi Kong2c9b3e02021-01-27 15:48:31 +080024 "system/extras/simpleperf",
Janis Danisevskis1edd0392020-09-30 14:28:07 -070025 "system/hardware/interfaces/keystore2",
Bram Bonnée45541d2021-03-25 19:06:42 +010026 "system/logging/rust",
Janis Danisevskis8b7eb8d2020-07-20 09:15:16 -070027 "system/security",
Andrei Homescu834152c2020-07-31 19:52:45 -070028 "system/tools/aidl",
Ivan Lozano03a94c42021-06-28 11:27:11 -040029 "tools/security/fuzzing/example_rust_fuzzer",
30 }
31
32 DownstreamRustAllowedPaths = []string{
33 // Add downstream allowed Rust paths here.
Ivan Lozanoe169ad72019-09-18 08:42:54 -070034 }
35
36 RustModuleTypes = []string{
Ivan Lozano03a94c42021-06-28 11:27:11 -040037 // Don't add rust_bindgen or rust_protobuf as these are code generation modules
38 // and can be expected to be in paths without Rust code.
39 "rust_benchmark",
40 "rust_benchmark_host",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070041 "rust_binary",
42 "rust_binary_host",
43 "rust_library",
44 "rust_library_dylib",
45 "rust_library_rlib",
Matthew Maurer2ae05132020-06-23 14:28:53 -070046 "rust_ffi",
47 "rust_ffi_shared",
48 "rust_ffi_static",
Ivan Lozano03a94c42021-06-28 11:27:11 -040049 "rust_fuzz",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070050 "rust_library_host",
51 "rust_library_host_dylib",
52 "rust_library_host_rlib",
Matthew Maurer2ae05132020-06-23 14:28:53 -070053 "rust_ffi_host",
54 "rust_ffi_host_shared",
55 "rust_ffi_host_static",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070056 "rust_proc_macro",
Ivan Lozano8a342872019-11-14 07:36:22 -080057 "rust_test",
58 "rust_test_host",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070059 }
60)