How bstaber/rustineers works
Project type and purpose
• This is an open-source, educational monorepo that teaches Rust via applied-science examples. It combines:
• A multi-chapter MDBook (in the book/ folder)
• A set of standalone Rust library crates (in crates/…)
• A root Cargo workspace (root Cargo.toml)
• GitHub Actions workflows to lint, test, build & deploy the book
File structure
• Top-level:
• .github/workflows/ – CI jobs (lint.yml, tests.yml, .deploy-book.yml)
• book/ – MDBook source (chapters in Markdown; book.toml config)
• crates/ – N independent Rust libraries (e.g. krr_ndarray, poisson_2d, ridge_1d_fn, simple_optimizers_traits, etc.), each with its own Cargo.toml and src/
• src/lib.rs – the root workspace’s “virtual” crate (likely only for workspace-level tooling)
• Justfile – convenience tasks
• CI config and workspace Cargo files
README
a. Main components
1) Developer workstation (writes code & docs)
2) GitHub repository
3) Rust toolchain (cargo build/test, mdbook build)
4) CI/CD (GitHub Actions)
5) MDBook site (static site)
6) Crates.io (optional publish target for libraries)
b. Relationships & interactions
• Developer → Git push → GitHub repo
• GitHub → CI workflows (lint, test crates, build & deploy book)
• CI → Rust toolchain:
– cargo test on each crate
– mdbook build/book → static HTML
• Deploy-book workflow → GitHub Pages (book site)
• (Optionally) crates published to crates.io via cargo publish
c. Architectural patterns & principles
– Monorepo Cargo workspace for versioned crates
– MDBook-driven documentation site co-located with code
– GitHub Actions for automated CI/CD
– Clear separation: one folder per crate, one folder for docs
d. Key technologies/frameworks
– Rust & Cargo (workspace)
– mdBook (Rust-based book generator)
– GitHub Actions (YAML workflows)
– Just (task runner)
Detailed guidance
• Crates into a “Rust Libraries” cluster.
• MDBook in a separate “Documentation” cluster.
• CI workflows as three sequential stages (lint → test → build & deploy).