不喜欢广告? 无广告 今天

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

广告 · 消除?
想要享受无广告的体验吗? 立即无广告

安装我们的扩展

将 IO 工具添加到您最喜欢的浏览器,以便即时访问和更快地搜索

添加 Chrome 扩展程序 添加 边缘延伸 添加 Firefox 扩展 添加 Opera 扩展

记分板已到达!

记分板 是一种有趣的跟踪您游戏的方式,所有数据都存储在您的浏览器中。更多功能即将推出!

广告 · 消除?
广告 · 消除?
广告 · 消除?

新闻角 包含技术亮点

参与其中

帮助我们继续提供有价值的免费工具

给我买杯咖啡
广告 · 消除?