Best practices for mdbook inclusion in a project

Hi,

I was wondering what would be the best practice to produce a mdbook that accompanies a crate (or a workspace). Some options:

  1. 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-path on invocation) as there is no way to formally add dependencies to mdbook.
  2. A directory inside the main crate. The problem here is that there is no way, AFAIK, for cargo test to call mdbook test in one of its directories. I could imagine an integration test framework (travis, circle, azure pipelines, ...) calling both cargo test and mdbook test separately.
  3. A similar argument to 2 can be made for workspaces.

Any ideas? Am I forgetting something obivous?

Thanks,

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.