Skip to content

Commit ea3dd66

Browse files
committed
Update docs
1 parent dccf001 commit ea3dd66

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ always indicate a bug in them (or a bug in Rustlantis).
2323
- rustup
2424

2525
## Config
26-
Copy `config.toml.example` to `config.toml` and supply the paths to testing backends.
26+
Copy `config.toml.example` to `config.toml` and supply the paths to the *repository root* of testing backends.
2727

2828
To prepare `rustc_codegen_cranelift`:
2929
```bash
@@ -38,6 +38,40 @@ cargo install rustup-toolchain-install-master
3838
cd miri && ./miri toolchain && ./miri build --release && ./target/release/cargo-miri miri setup
3939
```
4040

41+
## Usage
42+
43+
To generate and difftest one seed, run
44+
45+
```bash
46+
./fuzz-one.sh <seed>
47+
```
48+
49+
A program will be generated to `$TMPDIR` and tested. If difftest passes (no bug), it will exit with 0. If difftest spots a difference between testing backends, it will exit with 1 and save the reproduction file to `./repros/`.
50+
51+
To generate a program only, run `generate`
52+
```
53+
Usage: generate [OPTIONS] <seed>
54+
55+
Arguments:
56+
<seed> generation seed
57+
58+
Options:
59+
-d, --debug generate a program where values are printed instead of hashed (slow)
60+
-h, --help Print help
61+
-V, --version Print version
62+
```
63+
64+
To difftest an existing program, run `difftest`
65+
```
66+
Usage: difftest <file>
67+
68+
Arguments:
69+
<file>
70+
71+
Options:
72+
-h, --help Print help
73+
```
74+
4175
## Quirks
4276
- Cranelift not supported on AArch64 macOS: https://github.com/bjorn3/rustc_codegen_cranelift/issues/1248
4377
- `rustc_codegen_backend` can be used as a backend, but it doesn't support enough language features yet to be usable

generate/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626
env_logger::init();
2727
let matches = command!()
2828
.args(&[
29-
arg!(-d --debug "debug print dumpped variables"),
29+
arg!(-d --debug "generate a program where values are printed instead of hashed (slow)"),
3030
arg!(<seed> "generation seed").value_parser(value_parser!(u64)),
3131
])
3232
.get_matches();

0 commit comments

Comments
 (0)