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
I think the most important part is the web framework integration page because that's an external integration point.
One complication is that the documentation build doesn't include the web framework support. And for good reason – the build with --all-features takes twice as long. So this test step will have to be stuck on the end of the "All features" build, which I guess is okay but kind of strange.
The text was updated successfully, but these errors were encountered:
My current approach is to have a dummy crate that imports the book's contents using #[doc = include_str!("...")]. Then running cargo test on that crate will test all the code snippets in the book.
An alternative is to invoke rustdoc directly, with something like:
mdBook uses this approach. But this bypasses Cargo, which leads to two disadvantages:
I have to arrange for all the dependencies to be built before running the test.
The extern prelude is not populated automatically. This means I have to maintain the --extern flags by hand, or litter the examples with extern crate maud;.
Another alternative is to use rust-skeptic, but I think our hand-rolled approach is simple enough that it's not worth bringing in another dependency to do it.
Much like what's done with mdbook test.
I think the most important part is the web framework integration page because that's an external integration point.
One complication is that the documentation build doesn't include the web framework support. And for good reason – the build with
--all-features
takes twice as long. So this test step will have to be stuck on the end of the "All features" build, which I guess is okay but kind of strange.The text was updated successfully, but these errors were encountered: