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
Copy file name to clipboardExpand all lines: src/2025h2/relink-dont-rebuild.md
+17-31Lines changed: 17 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,15 @@
4
4
| Metadata ||
5
5
| -------- | --- |
6
6
| Point of contact |@yaahc|
7
-
| Teams |@compiler, @cargo|
8
-
| Task Owner(s)|@yaahc, @dropbear32|
7
+
| Teams |<!-- TEAMS WITH ASKS -->|
8
+
| Task owners|<!-- TASK OWNERS -->|
9
9
| Status | Proposed |
10
-
| Tracking Issue| TBD |
11
-
| Zulip Channel| TBD |
10
+
| Tracking issue||
11
+
| Zulip channel||
12
12
13
13
## Summary
14
14
15
-
Work towards avoiding rebuilds of a crate's dependents for changes that don't affect the crate's
15
+
Work towards avoiding rebuilds of a crate's dependents for changes that don't affect the crate's
16
16
public interface.
17
17
18
18
<!--Our end goal is to have some flags available on nightly that enable avoiding unnecessary rebuilds in certain cases. -->
@@ -36,9 +36,9 @@ identical one all cause rebuilds of reverse dependencies of that crate.
36
36
This clashes with users' intuition for what needs to be rebuilt when certain changes are made
37
37
and makes iterating more painful.
38
38
39
-
As a point of reference, in C and C++ – where there is a strict separation between interface
40
-
and implementation in the form of header files – equivalent changes would only cause a
41
-
rebuild of the translation unit whose source has been modified. For other units, existing
39
+
As a point of reference, in C and C++ – where there is a strict separation between interface
40
+
and implementation in the form of header files – equivalent changes would only cause a
41
+
rebuild of the translation unit whose source has been modified. For other units, existing
42
42
compiler outputs would be reused (and re-linked into the final binary).
43
43
44
44
Our goal is to work towards making `cargo` and `rustc` smarter about when they do or don't need to
@@ -79,13 +79,13 @@ flowchart TB
79
79
grep
80
80
ignore
81
81
ripgrep
82
-
82
+
83
83
globset --> ignore --> ripgrep
84
-
84
+
85
85
globset --> grep-cli --> grep --> ripgrep
86
86
```
87
87
88
-
Consider a change that does not alter the interface of the `globset` crate (for example,
88
+
Consider a change that does not alter the interface of the `globset` crate (for example,
89
89
modifying a private item or changing a comment within `globset`'s source code).
90
90
91
91
Here is the output of `cargo build --timings` for an incremental build of `ripgrep` where only
@@ -168,7 +168,7 @@ flowchart TB
168
168
```
169
169
170
170
[^caveat_pipelining]:
171
-
We have taken some liberties in the above graph w.r.t. pipelining.
171
+
We have taken some liberties in the above graph w.r.t. pipelining.
172
172
Today, `cargo` preforms a single `rustc` invocation to produce the `rlib` and `rmeta`
173
173
for each crate – `rmeta` is modeled as an "early out".
174
174
Additionally, producing `ripgrep.rlib` and linking (the `rg (bin)` node) happens as part
@@ -300,9 +300,9 @@ in `rustc_TBD`'s interface).
300
300
301
301
*This text is NORMATIVE, in the sense that teams should review this and make sure they are aligned. If not, then the shiny future should be moved to frequently asked questions with a title like "what might we do next".*-->
302
302
303
-
Only changes to a crate that affect the public interface of the crate should cause downstream
303
+
Only changes to a crate that affect the public interface of the crate should cause downstream
304
304
crates to rebuild.
305
-
305
+
306
306
<!--
307
307
## Design axioms
308
308
@@ -320,15 +320,16 @@ crates to rebuild.
320
320
321
321
*This section defines the specific work items that are planned and who is expected to do them. It should also include what will be needed from Rust teams. The table below shows some common sets of asks and work, but feel free to adjust it as needed. Every row in the table should either correspond to something done by a contributor or something asked of a team. For items done by a contributor, list the contributor, or ![Heap wanted][] if you don't yet know who will do it. For things asked of teams, list ![Team][] and the name of the team. The things typically asked of teams are defined in the [Definitions](#definitions) section below.* -->
0 commit comments