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: Readme.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -13,14 +13,20 @@ $ ./test.sh --release
13
13
14
14
## Usage
15
15
16
-
`$cg_clif_dir` is the directory you cloned this repo into in the following instructions.
16
+
rustc_codegen_cranelift can be used as a near-drop-in replacement for `cargo build` or `cargo run` for existing projects.
17
+
18
+
Assuming `$cg_clif_dir` is the directory you cloned this repo into and you followed the instructions (`prepare.sh` and `test.sh`).
17
19
18
20
### Cargo
19
21
22
+
In the directory with your project (where you can do the usual `cargo build`), run:
23
+
20
24
```bash
21
25
$ CHANNEL="release"$cg_clif_dir/cargo.sh run
22
26
```
23
27
28
+
This should build and run your project with rustc_codegen_cranelift instead of the usual LLVM backend.
29
+
24
30
If you compiled cg_clif in debug mode (aka you didn't pass `--release` to `./test.sh`) you should use `CHANNEL="debug"` instead or omit `CHANNEL="release"` completely.
0 commit comments