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
+17-1
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,21 @@ It's unlikely that you want `enzyme` as your default toolchain for all your rust
41
41
$ rustup override set enzyme
42
42
```
43
43
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)
45
59
46
60
Finally, you can run tests for all chapters using
47
61
@@ -55,6 +69,8 @@ or a specific chapter using that chapter's name, such as
55
69
$ mdbook test -c Usage
56
70
```
57
71
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
+
58
74
#### mdBook and `lto=fat` (temporary workaround)
59
75
60
76
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