Rust Tool Base (RTB)¶
RTB is a Rust sibling of Go Tool Base (GTB). It is a
batteries-included application framework for Rust CLI tools — not a
port of GTB's Go API. It embraces idiomatic Rust from top to bottom
(Arc<T> over context-threading, thiserror + miette over an
ErrorHandler funnel, typestate builders over functional options,
linkme distributed slices over package-level init()).
Start here¶
- Why RTB? — philosophy, scope, and the paradigm-swap table that maps GTB patterns to Rust-native replacements.
- Ecosystem Survey — the
best-in-class crates RTB wraps (
clap,figment,miette,rust-embed,keyring,secrecy,cucumber-rs, …) and why each was chosen.
Reference¶
- Concepts — conceptual tours that cut
across crates: the
Appcontext, configuration layering, error diagnostics. - Components — per-crate reference
pages for every crate that has reached v0.1:
rtb-error,rtb-app,rtb-config,rtb-assets,rtb-cli,rtb-credentials,rtb-telemetry,rtb-test-support.
Building on RTB¶
- Quick start in the README
— a one-screen example matching
examples/minimal. - Engineering Standards — standing rules for security, Rust idiom, concurrency, documentation, and testing. Read before contributing.
Process¶
- BDD pattern — how every crate
wires
cucumber-rsintocargo test. - Framework spec — the authoritative architectural contract, including the roadmap.
- Per-crate v0.1 specs — each shipped crate has a dated spec with acceptance criteria, design rationale, and open questions.