Skip to content

Commit 6a9e61d

Browse files
committed
Update README with cargo test
1 parent 81470df commit 6a9e61d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,21 @@ It's unlikely that you want `enzyme` as your default toolchain for all your rust
4141
$ rustup override set enzyme
4242
```
4343

44-
### mdBook testing
44+
### Testing with Cargo
45+
46+
Code samples worth testing are being migrated to the `samples` crate. You can run all samples with a simple
47+
48+
``` console
49+
$ cargo test
50+
```
51+
52+
or, using [cargo-nextest](https://nexte.st/),
53+
54+
``` console
55+
$ cargo nextest run
56+
```
57+
58+
### Testing with mdBook (deprecated)
4559

4660
Finally, you can run tests for all chapters using
4761

@@ -55,6 +69,8 @@ or a specific chapter using that chapter's name, such as
5569
$ mdbook test -c Usage
5670
```
5771

72+
This testing mode is being phased out as we move testable code into the `samples` crate. When using this mode, you will need the following workaround:
73+
5874
#### mdBook and `lto=fat` (temporary workaround)
5975

6076
Rust's Enzyme support currently requires `lto=fat`, which is not part of the default profile for `rustdoc` (which is invoked by `mdbook test`). My temporary hack has been to patch `mdbook` by applying the following.

0 commit comments

Comments
 (0)