Repo structure
[repo_structure.incl: fix (P1)](https://github.com/john-cd/rust_howto/issues/532)
- The repo contains a book, which markdown sources are in the
src
folder. - After the book is built using
mdbook
⮳, the resulting HTML and Javascript are found inbook/html
. - The intermediate (processed) Markdown is in
book/markdown
. Themdbook
⮳ configuration is inbook.toml
; the templates and assets are intheme
andstatic
respectively. - The Rust code is organized as a
cargo
⮳ workspace:- Examples that are embedded in the book are found in crates below
crates/ex
, named after sections of the book or grouping multiple (crates.io) categories of examples. Each example is in a single, short.rs
file. TheCargo.toml
within these crates list the dependencies used by the embedded examples. Usecargo add <crate> -F <feature>
while in the appropriate crate folder to add more as required. - Additional examples that are too long or complex to be inserted in the book itself can be added under
crates/xmpl
. crates/tools
contains utilities to build sections of the book, for example some indices.
- Examples that are embedded in the book are found in crates below
- The Dev Container and Docker (Compose) configuration files are found in
.devcontainer
.
[repo_structure: edit (P1)](https://github.com/john-cd/rust_howto/issues/533)
All examples are fully and continuously tested
In order to make sure that all examples work, they are backed by tests, similar to the following:
[test]
fn test() {
main();
}
For the sake of readability, that boilerplate is hidden by default. In order to read the full contents, click on the "expand" () button located in the top right corner of the code snippets.