不喜欢广告? 去 无广告 今天
Rust Code Formatter
开发人员文本
广告 · 消除?
广告 · 消除?
指导
Rust Code Formatter
Format your Rust code following official rustfmt conventions. Paste your code, configure formatting options, and get clean, consistently styled output matching cargo fmt standards.
如何使用
Paste your Rust code into the editor, select your preferred max line width (80, 100, or 120 characters) and Rust edition (2015, 2018, or 2021), then click Format. The formatted output appears with syntax highlighting, ready to copy or download as a .rs file.
特征
- Rustfmt Rules – 4-space indentation, trailing commas, consistent brace placement, and operator spacing
- Configurable Max Width – Choose 80, 100, or 120 character line width
- Edition Support – Format for Rust 2015, 2018, or 2021 edition
- Syntax Highlighting – Color-coded Rust code in both input and output
- Comment Preservation – Inline and block comments are kept intact
- Download as .rs – Save formatted code directly as a Rust source file
- Sample Code – Test with a pre-filled Rust example
广告 · 消除?
