#miden #pretty-print #prettier

no-std miden-formatting

Versatile pretty-printing and display formatting utilities used by Miden

2 releases

0.1.1 Mar 22, 2024
0.1.0 Mar 21, 2024

#109 in Value formatting

Download history 450/week @ 2024-07-23 307/week @ 2024-07-30 498/week @ 2024-08-06 479/week @ 2024-08-13 965/week @ 2024-08-20 1421/week @ 2024-08-27 834/week @ 2024-09-03 1347/week @ 2024-09-10 962/week @ 2024-09-17 754/week @ 2024-09-24 761/week @ 2024-10-01 629/week @ 2024-10-08 831/week @ 2024-10-15 1374/week @ 2024-10-22 1610/week @ 2024-10-29 1627/week @ 2024-11-05

5,582 downloads per month
Used in 34 crates (via miden-core)

MIT license

45KB
956 lines

miden-formatting

LICENSE RUST_VERSION CRATE CI

This crate provides some general infrastructure for pretty-printers and value foramtting that is needed by various Miden crates. Rather than implement this stuff in every place where it is needed, we've extracted the most important and general bits and put them in this crate.

Usage

Add miden-formatting to your Cargo.toml:

[dependencies]
miden-formatting = "0.1"

For #![no_std] builds:

[dependencies]
miden-formatting = { version = "0.1", default-features = false }

There is a std feature you can use to conditionally enable functionality that requires libstd to implement. For now this features is not actually needed, but is likely to be used in the future, so we're providing it now.

Intro

Most likely you are pulling in this crate to make use of the pretty-printer infrastructure. See the documentation for the PrettyPrint trait for a comprehensive intro to how to get started with it.

You may also be interested in the example syntax tree defined here. This makes use of most features of the pretty printer in a small made-up language for learning.

License

This project is MIT licensed

Dependencies

~1.5MB
~18K SLoC