prettify 0.3.0

An extensible, language-agnostic code formatter based on Prettier written in Rust.
Documentation
  • Coverage
  • 0%
    0 out of 36 items documented0 out of 2 items with examples
  • Size
  • Source code size: 55.99 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 852.91 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Nick-Mazuk

Prettify

An extensible, language-agnostic code formatter based on Prettier written in Rust.

The goal of this library is to provide a simple, fast, and extensible way to format code. Instead of formatting code for any specific language, it's language agnostic by accepting an intermediate representation instead of an AST.

That way, you can format code at the speed of Rust.

Prettify is in beta. I believe it's feature complete and there are no bugs in this library. However, this library does not yet have 100% end-to-end test coverage, so it is possible there are bugs. Please file an issue if you find a bug.


This library is simply the core algorithm for Prettify. The actual parsing of each of different languages are in their own crates:

This library is distributed as it's own crate in case you wish to use it in your own project or for your own language. That way you can simply describe how your language should be formatted and let Prettify take care of the rest!