@@ -6,47 +6,53 @@ use std::path::Path;
6
6
7
7
/// These are licenses that are allowed for all crates, including the runtime,
8
8
/// rustc, tools, etc.
9
+ #[ rustfmt:: skip]
9
10
const LICENSES : & [ & str ] = & [
10
- "MIT/Apache-2.0" ,
11
- "MIT / Apache-2.0" ,
12
- "Apache-2.0/MIT" ,
11
+ // tidy-alphabetical-start
12
+ "(MIT OR Apache-2.0) AND Unicode-DFS-2016" , // unicode_ident
13
+ "0BSD OR MIT OR Apache-2.0" , // adler license
14
+ "0BSD" ,
13
15
"Apache-2.0 / MIT" ,
14
- "MIT OR Apache-2.0" ,
15
16
"Apache-2.0 OR MIT" ,
16
17
"Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" , // wasi license
17
- "MIT" ,
18
+ "Apache-2.0/ MIT" ,
18
19
"ISC" ,
19
- "Unlicense/MIT" ,
20
+ "MIT / Apache-2.0" ,
21
+ "MIT OR Apache-2.0 OR Zlib" , // tinyvec_macros
22
+ "MIT OR Apache-2.0" ,
23
+ "MIT OR Zlib OR Apache-2.0" , // miniz_oxide
24
+ "MIT" ,
25
+ "MIT/Apache-2.0" ,
26
+ "Unicode-DFS-2016" , // tinystr and icu4x
20
27
"Unlicense OR MIT" ,
21
- "0BSD" ,
22
- "0BSD OR MIT OR Apache-2.0" , // adler license
23
- "Zlib OR Apache-2.0 OR MIT" , // tinyvec
24
- "MIT OR Apache-2.0 OR Zlib" , // tinyvec_macros
25
- "MIT OR Zlib OR Apache-2.0" , // miniz_oxide
26
- "(MIT OR Apache-2.0) AND Unicode-DFS-2016" , // unicode_ident
27
- "Unicode-DFS-2016" , // tinystr and icu4x
28
+ "Unlicense/MIT" ,
29
+ "Zlib OR Apache-2.0 OR MIT" , // tinyvec
30
+ // tidy-alphabetical-end
28
31
] ;
29
32
30
33
/// These are exceptions to Rust's permissive licensing policy, and
31
34
/// should be considered bugs. Exceptions are only allowed in Rust
32
35
/// tooling. It is _crucial_ that no exception crates be dependencies
33
36
/// of the Rust runtime (std/test).
37
+ #[ rustfmt:: skip]
34
38
const EXCEPTIONS : & [ ( & str , & str ) ] = & [
39
+ // tidy-alphabetical-start
35
40
( "ar_archive_writer" , "Apache-2.0 WITH LLVM-exception" ) , // rustc
36
- ( "mdbook " , "MPL -2.0" ) , // mdbook
41
+ ( "codespan-reporting " , "Apache -2.0" ) , // cxx via iana-time-zone-haiku via time, only on haiku
37
42
( "colored" , "MPL-2.0" ) , // rustfmt
43
+ ( "dissimilar" , "Apache-2.0" ) , // rustdoc, rustc_lexer (few tests) via expect-test, (dev deps)
44
+ ( "fluent-langneg" , "Apache-2.0" ) , // rustc (fluent translations)
45
+ ( "fortanix-sgx-abi" , "MPL-2.0" ) , // libstd but only for `sgx` target. FIXME: this dependency violates the documentation comment above.
46
+ ( "instant" , "BSD-3-Clause" ) , // rustc_driver/tracing-subscriber/parking_lot
47
+ ( "mdbook" , "MPL-2.0" ) , // mdbook
38
48
( "ryu" , "Apache-2.0 OR BSL-1.0" ) , // cargo/... (because of serde)
39
- ( "codespan-reporting" , "Apache-2.0" ) , // cxx via iana-time-zone-haiku via time, only on haiku
40
- ( "instant" , "BSD-3-Clause" ) , // rustc_driver/tracing-subscriber/parking_lot
41
- ( "snap" , "BSD-3-Clause" ) , // rustc
42
- ( "fluent-langneg" , "Apache-2.0" ) , // rustc (fluent translations)
43
- ( "self_cell" , "Apache-2.0" ) , // rustc (fluent translations)
44
- // FIXME: this dependency violates the documentation comment above:
45
- ( "fortanix-sgx-abi" , "MPL-2.0" ) , // libstd but only for `sgx` target
46
- ( "dissimilar" , "Apache-2.0" ) , // rustdoc, rustc_lexer (few tests) via expect-test, (dev deps)
49
+ ( "self_cell" , "Apache-2.0" ) , // rustc (fluent translations)
50
+ ( "snap" , "BSD-3-Clause" ) , // rustc
51
+ // tidy-alphabetical-end
47
52
] ;
48
53
49
54
const EXCEPTIONS_CARGO : & [ ( & str , & str ) ] = & [
55
+ // tidy-alphabetical-start
50
56
( "bitmaps" , "MPL-2.0+" ) ,
51
57
( "bytesize" , "Apache-2.0" ) ,
52
58
( "dunce" , "CC0-1.0 OR MIT-0" ) ,
@@ -62,9 +68,11 @@ const EXCEPTIONS_CARGO: &[(&str, &str)] = &[
62
68
( "sized-chunks" , "MPL-2.0+" ) ,
63
69
( "subtle" , "BSD-3-Clause" ) ,
64
70
( "unicode-bom" , "Apache-2.0" ) ,
71
+ // tidy-alphabetical-end
65
72
] ;
66
73
67
74
const EXCEPTIONS_CRANELIFT : & [ ( & str , & str ) ] = & [
75
+ // tidy-alphabetical-start
68
76
( "cranelift-bforest" , "Apache-2.0 WITH LLVM-exception" ) ,
69
77
( "cranelift-codegen" , "Apache-2.0 WITH LLVM-exception" ) ,
70
78
( "cranelift-codegen-meta" , "Apache-2.0 WITH LLVM-exception" ) ,
@@ -80,6 +88,7 @@ const EXCEPTIONS_CRANELIFT: &[(&str, &str)] = &[
80
88
( "regalloc2" , "Apache-2.0 WITH LLVM-exception" ) ,
81
89
( "target-lexicon" , "Apache-2.0 WITH LLVM-exception" ) ,
82
90
( "wasmtime-jit-icache-coherence" , "Apache-2.0 WITH LLVM-exception" ) ,
91
+ // tidy-alphabetical-end
83
92
] ;
84
93
85
94
const EXCEPTIONS_BOOTSTRAP : & [ ( & str , & str ) ] = & [
@@ -95,6 +104,7 @@ const RUNTIME_CRATES: &[&str] = &["std", "core", "alloc", "test", "panic_abort",
95
104
/// This list is here to provide a speed-bump to adding a new dependency to
96
105
/// rustc. Please check with the compiler team before adding an entry.
97
106
const PERMITTED_RUSTC_DEPENDENCIES : & [ & str ] = & [
107
+ // tidy-alphabetical-start
98
108
"addr2line" ,
99
109
"adler" ,
100
110
"ahash" ,
@@ -113,8 +123,8 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
113
123
"chalk-engine" ,
114
124
"chalk-ir" ,
115
125
"chalk-solve" ,
116
- "convert_case" , // dependency of derive_more
117
126
"compiler_builtins" ,
127
+ "convert_case" , // dependency of derive_more
118
128
"cpufeatures" ,
119
129
"crc32fast" ,
120
130
"crossbeam-channel" ,
@@ -187,8 +197,8 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
187
197
"ppv-lite86" ,
188
198
"proc-macro-hack" ,
189
199
"proc-macro2" ,
190
- "pulldown-cmark" ,
191
200
"psm" ,
201
+ "pulldown-cmark" ,
192
202
"punycode" ,
193
203
"quote" ,
194
204
"rand" ,
@@ -227,14 +237,14 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
227
237
"tempfile" ,
228
238
"termcolor" ,
229
239
"termize" ,
240
+ "thin-vec" ,
230
241
"thiserror" ,
231
242
"thiserror-impl" ,
232
243
"thorin-dwp" ,
233
244
"thread_local" ,
234
245
"tinystr" ,
235
246
"tinyvec" ,
236
247
"tinyvec_macros" ,
237
- "thin-vec" ,
238
248
"tracing" ,
239
249
"tracing-attributes" ,
240
250
"tracing-core" ,
@@ -263,29 +273,37 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
263
273
"valuable" ,
264
274
"version_check" ,
265
275
"wasi" ,
266
- "windows" ,
267
276
"winapi" ,
268
277
"winapi-i686-pc-windows-gnu" ,
269
278
"winapi-util" ,
270
279
"winapi-x86_64-pc-windows-gnu" ,
280
+ "windows" ,
281
+ "windows-targets" ,
282
+ "windows_aarch64_gnullvm" ,
283
+ "windows_aarch64_msvc" ,
284
+ "windows_i686_gnu" ,
285
+ "windows_i686_msvc" ,
286
+ "windows_x86_64_gnu" ,
287
+ "windows_x86_64_gnullvm" ,
288
+ "windows_x86_64_msvc" ,
271
289
"writeable" ,
272
- // this is a false-positive: it's only used by rustfmt, but because it's enabled through a
273
- // feature, tidy thinks it's used by rustc as well.
274
- "yansi-term" ,
290
+ "yansi-term" , // this is a false-positive: it's only used by rustfmt, but because it's enabled through a feature, tidy thinks it's used by rustc as well.
275
291
"yoke" ,
276
292
"yoke-derive" ,
277
293
"zerofrom" ,
278
294
"zerofrom-derive" ,
279
295
"zerovec" ,
280
296
"zerovec-derive" ,
297
+ // tidy-alphabetical-end
281
298
] ;
282
299
283
300
const PERMITTED_CRANELIFT_DEPENDENCIES : & [ & str ] = & [
301
+ // tidy-alphabetical-start
284
302
"ahash" ,
285
303
"anyhow" ,
286
304
"autocfg" ,
287
- "bumpalo" ,
288
305
"bitflags" ,
306
+ "bumpalo" ,
289
307
"byteorder" ,
290
308
"cfg-if" ,
291
309
"cranelift-bforest" ,
@@ -324,6 +342,7 @@ const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[
324
342
"winapi-i686-pc-windows-gnu" ,
325
343
"winapi-x86_64-pc-windows-gnu" ,
326
344
"windows-sys" ,
345
+ // tidy-alphabetical-end
327
346
] ;
328
347
329
348
/// Dependency checks.
0 commit comments