Standards for Rust code in the Pyth Crosschain monorepo. The cross-cutting style.md, testing.md, and services.md also apply.
- style.md — toolchain pinning, formatting (
rustfmt,taplo), the clippy configuration, and the essential crates we standardize on. - idioms.md — avoiding panics, checked/saturating arithmetic, numeric
conversions without
as, and newtype IDs. - errors-and-logging.md —
anyhowfor services vsthiserrorfor libraries, preserving error sources, and structured logging withtracing. - testing.md — the
cargo fmt/cargo clippy/cargo testgate and#[tokio::test]conventions.