Core architecture rules for the rust-2026-Trahloc (r2026t) microcrate convention. Use this when creating crates, defining module structures, managing features, or configuring Cargo. Supersedes rust-r2025t.
The rust-2026-Trahloc Microcrate Convention (r2026t) is a strict layout, naming, and configuration standard for Rust workspaces. It supersedes r2025t — layout invariants are unchanged; r2026t adds centralized dependency/lint configuration and toolchain pinning.
For full reference, see the linked docs in this directory.
For every crate directory
X/, the root module isX.rs(flattened) orsrc/X.rs(binary only).
Banned filenames: mod.rs (forbidden everywhere) · lib.rs/main.rs (forbidden as logic containers — max 5 lines as tooling redirects only)
| Topic | Reference |
|---|---|
| Workspace structure, crate naming, layout | workspace-layout.md |
Cargo.toml templates, workspace.dependencies, workspace.lints, rust-toolchain.toml | cargo-config.md |
| Unit tests (in-file) and integration test crate | testing-strategy.md |
| Feature flags (downward flow) and splitting thresholds | splitting-and-features.md |
cargo-watch, sccache, mold, rust-analyzer | tooling.md |
src/ except in bin/tests/ workspace cratepublish = false, [lints] workspace = true, edition = "2024"[workspace.dependencies], inherited with { workspace = true }[workspace.lints], inherited by all members