rustfmt
The official code formatting tool for Rust, distributed with the Rust toolchain and invocable through cargo fmt. It automatically adjusts code formatting according to default rules and supports configuration via rustfmt.toml.
Timeline (last 90 days)
rustfmt alone cannot cover constraints on naming, doc comments, macro usage, or API design, requiring additional written guidelines.
rustfmt is the official code formatting tool provided by Rust, distributed with the Rust toolchain, and can be invoked via cargo fmt.
rustfmt supports adjusting some behavior through the rustfmt.toml configuration file, but its configurable options are relatively limited, and many options are still marked as unstable and can only be used under the nightly toolchain.
The Syntax Gate module documentation specifies that the gate alone decides whether to reject a write; rustfmt is only responsible for formatting and has no blocking authority.
After passing the Syntax Gate, if the file is a Rust file that was rustfmt-clean before the edit, the content to be written is first reformatted with rustfmt --edition 2024 to keep subsequent edit_file patch anchors stable.
The Syntax Gate probes the rustfmt binary with a 5-second timeout and formats with a 10-second timeout; any failure (missing binary, non-zero exit, timeout, non-UTF-8 output) silently skips normalization and writes the raw text to disk.
The tests and lints rustcoach runs use the real toolchain (cargo test, cargo clippy, rustfmt), not a simulated environment.
All Facts (7)
rustfmt alone cannot cover constraints on naming, doc comments, macro usage, or API design, requiring additional written guidelines.
50%Unverifiedrustfmt is the official code formatting tool provided by Rust, distributed with the Rust toolchain, and can be invoked via cargo fmt.
50%Unverifiedrustfmt supports adjusting some behavior through the rustfmt.toml configuration file, but its configurable options are relatively limited, and many options are still marked as unstable and can only be used under the nightly toolchain.
50%UnverifiedThe Syntax Gate module documentation specifies that the gate alone decides whether to reject a write; rustfmt is only responsible for formatting and has no blocking authority.
50%UnverifiedAfter passing the Syntax Gate, if the file is a Rust file that was rustfmt-clean before the edit, the content to be written is first reformatted with rustfmt --edition 2024 to keep subsequent edit_file patch anchors stable.
50%UnverifiedThe Syntax Gate probes the rustfmt binary with a 5-second timeout and formats with a 10-second timeout; any failure (missing binary, non-zero exit, timeout, non-UTF-8 output) silently skips normalization and writes the raw text to disk.
50%UnverifiedThe tests and lints rustcoach runs use the real toolchain (cargo test, cargo clippy, rustfmt), not a simulated environment.
50%