about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-05-25 08:41:50 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-05-25 08:41:50 +0000
commitd9a3f5cfebd189044fe294ec8398a6cac6ee613d (patch)
tree5a751485d5861e3e0987c7ea2a7b04d669db928a
parent3e0c1c8e0cdeab8871f96b1703f6b8a852d51568 (diff)
downloadrust-d9a3f5cfebd189044fe294ec8398a6cac6ee613d.tar.gz
rust-d9a3f5cfebd189044fe294ec8398a6cac6ee613d.zip
Add instructions
-rw-r--r--README.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 00000000000..de358941b78
--- /dev/null
+++ b/README.md
@@ -0,0 +1,33 @@
+This crate is regularly synced with its mirror in the rustc repo at `compiler/rustc_smir`.
+
+We use `git subtree` for this to preserve commits and allow the rustc repo to
+edit these crates without having to touch this repo. This keeps the crates compiling
+while allowing us to independently work on them here. The effort of keeping them in
+sync is pushed entirely onto us, without affecting rustc workflows negatively.
+This may change in the future, but changes to policy should only be done via a
+compiler team MCP.
+
+## Instructions for syncing
+
+### Updating this repository
+
+In the rustc repo, execute
+
+```
+git subtree push --prefix=compiler/rustc_smir url_to_your_fork_of_project_stable_mir some_feature_branch
+```
+
+and then open a PR of your `some_feature_branch` against https://github.com/rust-lang/project-stable-mir
+
+### Updating the rustc librar
+
+
+In the rustc repo, execute
+
+```
+git subtree pull --prefix=compiler/rustc_smir https://github.com/rust-lang/project-stable-mir smir
+```
+
+Note: only ever sync to rustc from the project-stable-mir's `smir` branch. Do not sync with your own forks.
+
+Then open a PR against rustc just like a regular PR.