blob: 9129b0e100b3ae189210eecd09aaef95a225306d [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",
Matthew Maurer14f26aa2022-04-27 14:20:11 -070011 "external/boringssl",
Alistair Delvae172eaf2020-10-21 06:56:13 -070012 "external/crosvm",
Victor Hsieh274597b2020-12-03 16:08:43 -080013 "external/libchromeos-rs",
Lingfeng Yang0f8c5b42020-02-20 07:27:15 -080014 "external/minijail",
Janis Danisevskis73f21042021-11-12 10:06:35 -080015 "external/open-dice",
Chih-Hung Hsiehc74d7232019-10-25 10:01:42 -070016 "external/rust",
Joel Galensone4d63902021-08-10 11:54:14 -070017 "external/selinux/libselinux",
Matthew Maurer80f0eb12021-08-26 20:36:37 +000018 "external/uwb",
Alistair Delvaea2974c2020-10-21 06:56:58 -070019 "external/vm_tools/p9",
Stephen Cranefb67ab52020-05-06 14:28:21 -070020 "frameworks/native/libs/binder/rust",
Joel Galenson77a684e2021-02-17 11:22:38 -080021 "frameworks/proto_logging/stats",
Janis Danisevskisa9029d12021-11-09 07:56:28 -080022 "hardware/interfaces/security",
Matthew Maurer2f907082022-01-14 21:56:47 +000023 "hardware/interfaces/uwb",
Baligh Uddin5dd07e52021-11-06 01:41:50 +000024 "packages/modules/Bluetooth",
Bernie Innocenti3a710d62020-12-05 02:55:53 +090025 "packages/modules/DnsResolver",
ziyiwf3d02222021-10-27 17:32:55 +000026 "packages/modules/Uwb",
Andrew Scullaf2015d2020-10-13 11:42:28 +010027 "packages/modules/Virtualization",
Pirama Arumuga Nainarfac98b52022-03-08 22:27:20 -080028 "platform_testing/tests/codecoverage/native/rust",
Matthew Maurer99020b02019-10-31 10:44:40 -070029 "prebuilts/rust",
Andrew Walbran838febf2022-03-24 16:56:39 +000030 "system/core/debuggerd/rust",
Joel Galensonf4b139a2021-03-30 13:39:45 -070031 "system/core/libstats/pull_rust",
David LeGare3eee5c42022-03-31 16:58:38 +000032 "system/core/trusty/libtrusty-rs",
Hasini Gunasinghe07851ff2022-05-06 07:00:03 +000033 "system/core/trusty/keymint",
Yi Kong91c3e4e2020-08-05 01:03:05 +080034 "system/extras/profcollectd",
Yi Kong2c9b3e02021-01-27 15:48:31 +080035 "system/extras/simpleperf",
Janis Danisevskis1edd0392020-09-30 14:28:07 -070036 "system/hardware/interfaces/keystore2",
David Drysdale21252b42022-02-24 18:47:28 +000037 "system/keymint",
Joel Galenson84be2fc2021-07-29 15:40:23 -070038 "system/librustutils",
Joel Galensona7614dd2021-08-23 14:02:49 -070039 "system/logging/liblog",
Bram Bonnée45541d2021-03-25 19:06:42 +010040 "system/logging/rust",
Zach Johnson5145e9d2021-09-17 12:08:07 -070041 "system/nfc",
Janis Danisevskis8b7eb8d2020-07-20 09:15:16 -070042 "system/security",
Andrei Homescu834152c2020-07-31 19:52:45 -070043 "system/tools/aidl",
Ivan Lozano03a94c42021-06-28 11:27:11 -040044 "tools/security/fuzzing/example_rust_fuzzer",
Joel Galensond9931552021-10-21 14:28:00 -070045 "tools/security/fuzzing/orphans",
Aditya Belsarec0bd27b2022-02-08 07:29:11 +000046 "tools/security/remote_provisioning/cert_validator",
Richard Fung3d11a562022-01-18 18:26:35 +000047 "tools/vendor",
Ivan Lozanodca00cb2021-07-27 11:57:57 -040048 "vendor/",
Ivan Lozano03a94c42021-06-28 11:27:11 -040049 }
50
51 DownstreamRustAllowedPaths = []string{
52 // Add downstream allowed Rust paths here.
Ivan Lozanoe169ad72019-09-18 08:42:54 -070053 }
54
55 RustModuleTypes = []string{
Ivan Lozano03a94c42021-06-28 11:27:11 -040056 // Don't add rust_bindgen or rust_protobuf as these are code generation modules
57 // and can be expected to be in paths without Rust code.
58 "rust_benchmark",
59 "rust_benchmark_host",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070060 "rust_binary",
61 "rust_binary_host",
62 "rust_library",
63 "rust_library_dylib",
64 "rust_library_rlib",
Matthew Maurer2ae05132020-06-23 14:28:53 -070065 "rust_ffi",
66 "rust_ffi_shared",
67 "rust_ffi_static",
Ivan Lozano03a94c42021-06-28 11:27:11 -040068 "rust_fuzz",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070069 "rust_library_host",
70 "rust_library_host_dylib",
71 "rust_library_host_rlib",
Matthew Maurer2ae05132020-06-23 14:28:53 -070072 "rust_ffi_host",
73 "rust_ffi_host_shared",
74 "rust_ffi_host_static",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070075 "rust_proc_macro",
Ivan Lozano8a342872019-11-14 07:36:22 -080076 "rust_test",
77 "rust_test_host",
Ivan Lozanoe169ad72019-09-18 08:42:54 -070078 }
79)