A Practical Guide on how to Structure and Maintain your Rust Projects
This guide offers advice on structuring and maintaining Rust projects, drawing from popular Rust projects and personal experience. It should not be viewed as a definitive guide, but rather as a collection of potential issues you might encounter and various ways to address them. Recognizing that some problems have multiple effective solutions, this guide presents a range of options. The hope is that it equips you with valuable advice, allowing your projects to benefit from the learnings of those that came before.
This book uses mdBook, a tool that is commonly used by the Rust ecosystem to write documentation in the style of books. It makes some modifications to the default mdBook configuration:
- The default font for text is Inter, a clean sans-serif typeface.
- The default font for code is Commit Mono, a clean monospaced typeface.
- The default font for diagrams is Routed Gothic, a recreation of the classic Gorton font used in technical drawings and machine labels.
- Tables have been modified to have higher rows, and a different color header.
- All diagrams are made with draw.io
In addition to that, there are some mdBook plugins that are used:
- mdbook-admonish
- mdbook-reading
- mdbook-files
To build the book, you can do one of:
- Install dependencies and run
just build - Run
nix build .?submodules=1
For writing style, read the STYLE file.