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. Learn more →
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.
-
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.
-
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.
-
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)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
{ "$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" } } }
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...
Project mention: Oxlint – written in Rust – 50-100 Times Faster than ESLint | news.ycombinator.com | 2023-12-15
Project mention: Oxlint – written in Rust – 50-100 Times Faster than ESLint | news.ycombinator.com | 2023-12-15
Project mention: Oxlint – written in Rust – 50-100 Times Faster than ESLint | news.ycombinator.com | 2023-12-15Python 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
Rust Formatter related posts
- Biome – fast JavaScript linter and formatter
- Rescuing legacy Node.js projects with Bun
- What is the most useful project you've ever worked on?
- Biomejs.dev (previously Rome-tools by Meta)
- RFC: Biome Plugins
- BiomeJS 2024 Roadmap
- I quit my job to work full time on my open source project [Atuin]
-
A note from our sponsor - InfluxDB
www.influxdata.com | 25 Apr 2024
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