Rust Formatter

Open-source Rust projects categorized as Formatter

Top 14 Rust Formatter Projects

  • biome

    A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.

  • Project mention: I switch from Eslint to Biome | dev.to | 2024-04-22

    { "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json", "organizeImports": { "enabled": true }, "files": { "ignore": ["package.json", "package-lock.json"] }, "linter": { "enabled": true, "rules": { "recommended": true, "style": { "noUnusedTemplateLiteral": "off" } } }, "formatter": { "indentStyle": "space", "indentWidth": 4, "lineWidth": 320 }, "javascript": { "formatter": { "semicolons": "asNeeded" } } }

  • rustfmt

    Format Rust code

  • Project mention: You can't do that because I hate you | news.ycombinator.com | 2023-12-28

    The author provides very surface-level criticism of two Rust tools, but they don't look into why those choices were made.

    With about five minutes of my time, I found out:

    wrap_comments was introduced in 2019 [0]. There are bugs in the implementation (it breaks Markdown tables), so the option hasn't been marked as stable. Progress on the issue has been spotty.

    --no-merge-sources is not trivial to re-implement [1]. The author has already explained why the flag no longer works -- Cargo integrated the command, but not all of the flags. This commit [2] explains why this functionality was removed in the first place.

    Rust is open source, so the author of this blog post could improve the state of the software they care about by championing these issues. The --no-merge-sources error message even encourages you to open an issue, presumably so that the authors of Cargo can gauge the importance of certain flags/features.

    You could even do something much simpler, like adding a comment to the related issues mentioning that you ran into these rough edges and that it made your life a little worse, or with a workaround that you found.

    Alternatively, you can continue to write about how much free software sucks.

    [0]: https://github.com/rust-lang/rustfmt/issues/3347

    [1]: https://github.com/rust-lang/cargo/pull/10344

    [2]: https://github.com/rust-lang/cargo/commit/3842d8e6f20067f716...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • dprint

    Pluggable and configurable code formatting platform written in Rust.

  • Project mention: Oxlint – written in Rust – 50-100 Times Faster than ESLint | news.ycombinator.com | 2023-12-15
  • StyLua

    An opinionated Lua code formatter

  • taplo

    A TOML toolkit written in Rust

  • nixpkgs-fmt

    Nix code formatter for nixpkgs [maintainer=@zimbatm]

  • treefmt

    one CLI to format your repo

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • prettier-plugin-rust

    Prettier Rust is an opinionated code formatter that autocorrects bad syntax.

  • Project mention: Oxlint – written in Rust – 50-100 Times Faster than ESLint | news.ycombinator.com | 2023-12-15
  • cbfmt

    A tool to format codeblocks inside markdown and org documents.

  • sleek

    Sleek is a CLI tool for formatting SQL. It helps you maintain a consistent style across your SQL code, enhancing readability and productivity. (by nrempel)

  • genemichaels

    Even formats macros

  • Project mention: Oxlint – written in Rust – 50-100 Times Faster than ESLint | news.ycombinator.com | 2023-12-15

    Python and JavaScript have similarly good formatters (as long as your idiot colleagues don't insist on using yapf instead of Black, despite yapf producing non-deterministic output!). In fact I would say Rust is probably behind Prettier in terms of auto formatting. The rustfmt output is less pretty (subjective I know), the devs have made several strange decisions and it seems to be semi-abandoned (maybe partly because the devs were ... shall we say not as friendly and welcoming as the Rust community likes to bleat on about).

    There are a couple of alternative formatters:

    * https://github.com/andrewbaxter/genemichaels

  • display_tree

    Simple, automatic, and customizable tree pretty-printing in Rust.

  • untex

    Understand and manipulate TeX files with ease

  • tyupy

    Get URL(s) title in any format 🐿️

  • Project mention: Tyupy v1.1.0 released! 🎉 | /r/rust | 2023-11-21
  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Rust Formatter related posts

Index

What are some of the best open-source Formatter projects in Rust? This list will help you:

Project Stars
1 biome 10,237
2 rustfmt 5,761
3 dprint 2,933
4 StyLua 1,374
5 taplo 1,155
6 nixpkgs-fmt 550
7 treefmt 474
8 prettier-plugin-rust 163
9 cbfmt 158
10 sleek 93
11 genemichaels 80
12 display_tree 27
13 untex 27
14 tyupy 7

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com