Skip to content

Commit d9a3f5c

Browse files
committed
Add instructions
1 parent 3e0c1c8 commit d9a3f5c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
This crate is regularly synced with its mirror in the rustc repo at `compiler/rustc_smir`.
2+
3+
We use `git subtree` for this to preserve commits and allow the rustc repo to
4+
edit these crates without having to touch this repo. This keeps the crates compiling
5+
while allowing us to independently work on them here. The effort of keeping them in
6+
sync is pushed entirely onto us, without affecting rustc workflows negatively.
7+
This may change in the future, but changes to policy should only be done via a
8+
compiler team MCP.
9+
10+
## Instructions for syncing
11+
12+
### Updating this repository
13+
14+
In the rustc repo, execute
15+
16+
```
17+
git subtree push --prefix=compiler/rustc_smir url_to_your_fork_of_project_stable_mir some_feature_branch
18+
```
19+
20+
and then open a PR of your `some_feature_branch` against https://github.com/rust-lang/project-stable-mir
21+
22+
### Updating the rustc librar
23+
24+
25+
In the rustc repo, execute
26+
27+
```
28+
git subtree pull --prefix=compiler/rustc_smir https://github.com/rust-lang/project-stable-mir smir
29+
```
30+
31+
Note: only ever sync to rustc from the project-stable-mir's `smir` branch. Do not sync with your own forks.
32+
33+
Then open a PR against rustc just like a regular PR.

0 commit comments

Comments
 (0)