Ivan Lozano | e169ad7 | 2019-09-18 08:42:54 -0700 | [diff] [blame] | 1 | package config |
| 2 | |
| 3 | var ( |
Thiébaud Weksteen | 425a542 | 2020-08-06 20:20:19 +0200 | [diff] [blame] | 4 | // When adding a new path below, add a rustfmt.toml file at the root of |
Andrew Scull | 5a58bca | 2020-10-13 13:49:29 +0100 | [diff] [blame] | 5 | // the repository and enable the rustfmt repo hook. See aosp/1458238 |
Thiébaud Weksteen | 425a542 | 2020-08-06 20:20:19 +0200 | [diff] [blame] | 6 | // for an example. |
| 7 | // TODO(b/160223496): enable rustfmt globally. |
Ivan Lozano | e169ad7 | 2019-09-18 08:42:54 -0700 | [diff] [blame] | 8 | RustAllowedPaths = []string{ |
A. Cody Schuffelen | 4e5fc3b | 2020-11-25 18:29:39 -0800 | [diff] [blame] | 9 | "device/google/cuttlefish", |
Alistair Delva | e172eaf | 2020-10-21 06:56:13 -0700 | [diff] [blame] | 10 | "external/adhd", |
| 11 | "external/crosvm", |
Victor Hsieh | 274597b | 2020-12-03 16:08:43 -0800 | [diff] [blame] | 12 | "external/libchromeos-rs", |
Lingfeng Yang | 0f8c5b4 | 2020-02-20 07:27:15 -0800 | [diff] [blame] | 13 | "external/minijail", |
Chih-Hung Hsieh | c74d723 | 2019-10-25 10:01:42 -0700 | [diff] [blame] | 14 | "external/rust", |
Alistair Delva | ea2974c | 2020-10-21 06:56:58 -0700 | [diff] [blame] | 15 | "external/vm_tools/p9", |
Stephen Crane | fb67ab5 | 2020-05-06 14:28:21 -0700 | [diff] [blame] | 16 | "frameworks/native/libs/binder/rust", |
Joel Galenson | 77a684e | 2021-02-17 11:22:38 -0800 | [diff] [blame] | 17 | "frameworks/proto_logging/stats", |
Bernie Innocenti | 3a710d6 | 2020-12-05 02:55:53 +0900 | [diff] [blame] | 18 | "packages/modules/DnsResolver", |
Andrew Scull | af2015d | 2020-10-13 11:42:28 +0100 | [diff] [blame] | 19 | "packages/modules/Virtualization", |
Matthew Maurer | 99020b0 | 2019-10-31 10:44:40 -0700 | [diff] [blame] | 20 | "prebuilts/rust", |
Qasim Javed | d271ada | 2020-10-28 13:40:05 -0700 | [diff] [blame] | 21 | "system/bt", |
Joel Galenson | f4b139a | 2021-03-30 13:39:45 -0700 | [diff] [blame] | 22 | "system/core/libstats/pull_rust", |
Yi Kong | 91c3e4e | 2020-08-05 01:03:05 +0800 | [diff] [blame] | 23 | "system/extras/profcollectd", |
Yi Kong | 2c9b3e0 | 2021-01-27 15:48:31 +0800 | [diff] [blame] | 24 | "system/extras/simpleperf", |
Janis Danisevskis | 1edd039 | 2020-09-30 14:28:07 -0700 | [diff] [blame] | 25 | "system/hardware/interfaces/keystore2", |
Bram Bonné | e45541d | 2021-03-25 19:06:42 +0100 | [diff] [blame] | 26 | "system/logging/rust", |
Janis Danisevskis | 8b7eb8d | 2020-07-20 09:15:16 -0700 | [diff] [blame] | 27 | "system/security", |
Andrei Homescu | 834152c | 2020-07-31 19:52:45 -0700 | [diff] [blame] | 28 | "system/tools/aidl", |
Ivan Lozano | 03a94c4 | 2021-06-28 11:27:11 -0400 | [diff] [blame^] | 29 | "tools/security/fuzzing/example_rust_fuzzer", |
| 30 | } |
| 31 | |
| 32 | DownstreamRustAllowedPaths = []string{ |
| 33 | // Add downstream allowed Rust paths here. |
Ivan Lozano | e169ad7 | 2019-09-18 08:42:54 -0700 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | RustModuleTypes = []string{ |
Ivan Lozano | 03a94c4 | 2021-06-28 11:27:11 -0400 | [diff] [blame^] | 37 | // 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 Lozano | e169ad7 | 2019-09-18 08:42:54 -0700 | [diff] [blame] | 41 | "rust_binary", |
| 42 | "rust_binary_host", |
| 43 | "rust_library", |
| 44 | "rust_library_dylib", |
| 45 | "rust_library_rlib", |
Matthew Maurer | 2ae0513 | 2020-06-23 14:28:53 -0700 | [diff] [blame] | 46 | "rust_ffi", |
| 47 | "rust_ffi_shared", |
| 48 | "rust_ffi_static", |
Ivan Lozano | 03a94c4 | 2021-06-28 11:27:11 -0400 | [diff] [blame^] | 49 | "rust_fuzz", |
Ivan Lozano | e169ad7 | 2019-09-18 08:42:54 -0700 | [diff] [blame] | 50 | "rust_library_host", |
| 51 | "rust_library_host_dylib", |
| 52 | "rust_library_host_rlib", |
Matthew Maurer | 2ae0513 | 2020-06-23 14:28:53 -0700 | [diff] [blame] | 53 | "rust_ffi_host", |
| 54 | "rust_ffi_host_shared", |
| 55 | "rust_ffi_host_static", |
Ivan Lozano | e169ad7 | 2019-09-18 08:42:54 -0700 | [diff] [blame] | 56 | "rust_proc_macro", |
Ivan Lozano | 8a34287 | 2019-11-14 07:36:22 -0800 | [diff] [blame] | 57 | "rust_test", |
| 58 | "rust_test_host", |
Ivan Lozano | e169ad7 | 2019-09-18 08:42:54 -0700 | [diff] [blame] | 59 | } |
| 60 | ) |