Minimalist Rust formatter as an alternative to rustfmt?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • prettier-plugin-rust

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

  • There are alternatives to rustfmt: Prettier Rust and genemichaels

  • genemichaels

    Even formats macros

  • There are alternatives to rustfmt: Prettier Rust and genemichaels

  • 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
  • goformat

    Alternative to gofmt with configurable formatting style (indentation etc.)

  • Likewise, gofmt implementing what you argue for resulted in the creation of goformat. There's a limit to how much you can force people on these things and, more importantly, there are formatting decisions which are more than mere bikeshedding in the eyes of the programmers to the point where they consider it more productive to maintain the formatting by hand if that's what it takes.

  • rfcs

    RFCs for changes to Rust

  • Some choice quotes from back when this was decided

  • topiary

  • build on top of https://github.com/tweag/topiary/blob/main/languages/rust.scm

  • prettyplease

    A minimal `syn` syntax tree pretty-printer

  • I doubt you would want to actually use this human-consumed code, but an interesting alternative that I know of is David Tolnay's prettyplease. It tries to be lightweight and consistent for auto-generated code.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts