All Projects → Marwes → pretty.rs

Marwes / pretty.rs

Licence: MIT license
Wadler-style pretty-printing combinators in Rust

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to pretty.rs

Tabula
🈸 Pretty printer for maps/structs collections (Elixir)
Stars: ✭ 85 (+0%)
Mutual labels:  pretty-printer
tv
📺(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.
Stars: ✭ 1,763 (+1974.12%)
Mutual labels:  pretty-printer
ex format
ExFormat formats Elixir source code according to a standard set of rules
Stars: ✭ 39 (-54.12%)
Mutual labels:  pretty-printer
kotlin-metadata-printer
Prints the Kotlin metadata attached to Java class files
Stars: ✭ 41 (-51.76%)
Mutual labels:  pretty-printer
sexp-grammar
Invertible parsing for S-expressions
Stars: ✭ 28 (-67.06%)
Mutual labels:  pretty-printer
language-rust
Parser and pretty-printer for the Rust language
Stars: ✭ 78 (-8.24%)
Mutual labels:  pretty-printer
html-pretty-min
PHP library for minifying and indenting HTML documents that works on the DOM tree
Stars: ✭ 19 (-77.65%)
Mutual labels:  pretty-printer
Logger
✔️ Simple, pretty and powerful logger for android
Stars: ✭ 13,093 (+15303.53%)
Mutual labels:  pretty-printer
zprint-clj
Node.js wrapper for ZPrint Clojure source code formatter
Stars: ✭ 13 (-84.71%)
Mutual labels:  pretty-printer
php-ast-reverter
Reverts the php-ast AST back into (somewhat) PSR-compliant code
Stars: ✭ 49 (-42.35%)
Mutual labels:  pretty-printer
glitter
Display git status information in your shell prompt
Stars: ✭ 47 (-44.71%)
Mutual labels:  pretty-printer
StyLua
An opinionated Lua code formatter
Stars: ✭ 479 (+463.53%)
Mutual labels:  pretty-printer
pretty print formatter
Pretty Print Formatter for Elixir Logger module -- Colorize Ecto's SQL ouput 🖌️
Stars: ✭ 22 (-74.12%)
Mutual labels:  pretty-printer

pretty.rs

Build Status Docs

Pretty printing combinators for Rust

Synopsis

This crate provides functionality for defining pretty printers. It is particularly useful for printing structured recursive data like trees.

The implementation was originally based on Larsen's SML translation (https://github.com/kfl/wpp) of Wadler's Haskell pretty printer (https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf). It has since been modified in various ways to better fit Rust's programming model. In particular, it uses iteration rather than recursion and provides streaming output.

Documentation

See the generated API documentation here.

Requirements

  1. Rust
  2. Cargo

You can install both with the following:

$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh

See Installation for further details.

Usage

$ cargo build                                          ## build library and binary
$ cargo run --example trees                            ## run the example (pretty trees)
$ cargo run --example colored --features termcolor     ## run the example (pretty colored output)
$ cargo bench                                          ## run benchmarks
$ cargo test                                           ## run tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].