Skip to content

Commit eda840a

Browse files
vibjorn3
andauthored
Longer README about how to use this instead of cargo run (rust-lang#1054)
* Longer README about how to use this instead of `cargo run` Resolves rust-lang#1052. Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
1 parent a3cd293 commit eda840a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Readme.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ $ ./test.sh --release
1313

1414
## Usage
1515

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`).
1719

1820
### Cargo
1921

22+
In the directory with your project (where you can do the usual `cargo build`), run:
23+
2024
```bash
2125
$ CHANNEL="release" $cg_clif_dir/cargo.sh run
2226
```
2327

28+
This should build and run your project with rustc_codegen_cranelift instead of the usual LLVM backend.
29+
2430
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.
2531

2632
### Rustc

0 commit comments

Comments
 (0)