You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Rust compiler supports building with some dependencies from `crates.io`.
4
-
Examples are `log` and `env_logger`.
5
4
6
-
In general,
7
-
you should avoid adding dependencies to the compiler for several reasons:
8
-
9
-
- The dependency may not be of high quality or well-maintained.
10
-
- The dependency may not be using a compatible license.
11
-
- The dependency may have transitive dependencies that have one of the above
12
-
problems.
13
-
14
-
<!-- date-check: Aug 2025 -->
15
-
Note that there is no official policy for vetting new dependencies to the compiler.
16
-
Decisions are made on a case-by-case basis, during code review.
5
+
Rust Forge has [official policy for vetting new dependencies].
17
6
18
7
## Permitted dependencies
19
8
20
-
The `tidy` tool has [a list of crates that are allowed]. To add a
21
-
dependency that is not already in the compiler, you will need to add it to the list.
9
+
The `tidy` tool has [a list of crates that are allowed].
10
+
To add a dependency that is not already in the compiler, you will need to add it to the list.
22
11
23
12
[a list of crates that are allowed]: https://github.com/rust-lang/rust/blob/9d1b2106e23b1abd32fce1f17267604a5102f57a/src/tools/tidy/src/deps.rs#L73
13
+
[official policy for vetting new dependencies]: https://forge.rust-lang.org/compiler/third-party-out-of-tree#third-party-crates
0 commit comments