File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,16 @@ future.
1414
1515## Background
1616
17- Some crates provide comprehensive APIs with a very large surface area, yet many
18- of their users need only a few entry points. In such cases, the compiler
19- currently spends time generating code for the entire crate, and then ends up
17+ When building a Rust library crate, the compiler generates compiled code for as
18+ much of the crate as it can[ ^ 1 ] , which
19+ gets linked into later crates into the dependency graph. However, some crates
20+ provide comprehensive APIs with a very large surface area, yet many of their
21+ users need only a few entry points. In such cases, the compiler currently
22+ spends time generating code for the entire crate, and the linker then ends up
2023throwing most of that code away as unused.
2124
25+ [ ^ 1 ] : Roughly, everything that isn't generic and isn't inlined.
26+
2227This can waste a substantial amount of compile time. Some large crates can take
2328minutes to compile, and when you use these large crates as dependencies, they
2429can take a disproportionate amount of the entire compilation time of your
You can’t perform that action at this time.
0 commit comments