I was wondering what would be the best practice to produce a mdbook that accompanies a crate (or a workspace). Some options:
- A completely separate project. In this case there would have to be a way to specify dependencies for the code snippets in the book. This would be ad-hoc (using
--library-pathon invocation) as there is no way to formally add dependencies to mdbook.
- A directory inside the main crate. The problem here is that there is no way, AFAIK, for
cargo testto call
mdbook testin one of its directories. I could imagine an integration test framework (travis, circle, azure pipelines, …) calling both
- A similar argument to 2 can be made for workspaces.
Any ideas? Am I forgetting something obivous?