A Rust formatter applies rustfmt conventions to Rust source code — 4-space indentation, opening braces on the same line, match arms properly indented, blank lines between function definitions, and proper spacing around ->, =>, and ::. The Rust community uses cargo fmt as the universal standard, and this tool applies the same rules in your browser.

0 lines / 0 chars
0 lines / 0 chars
Formatted Rust will appear here...

Example Snippets