How to run only the doctests?

Hello,

I'm wondering if there's a way to run the doctests (or even a specific one, ideally) without compiling and running all the other tests. I tried cargo test --doc but it seems that it's not supported for dynamic libraries:

❯ cargo test --doc
warning: doc tests are not supported for crate type(s) `dylib` in package `dispatcher`

"cargo test --doc" seems to work if you also build your crate as an rlib:

crate-type = ["dylib", "rlib"]
1 Like

Yep that was it. thank you!