Skip to content

A pretty-printing library based on Wadler's "A Prettier Printer" with support for ANSI styling.

Notifications You must be signed in to change notification settings

remexre/sparkly-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sparkly-rs

Build Status Crates.io Documentation License

Currently, the performance is really bad; pretty.rs may be preferred.

A pretty-printing library based on Wadler's "A Prettier Printer" with support for ANSI styling.

I'm using this to walk myself through the paper and understand it well enough to implement; plus it doesn't look like there's an existing implementation of this.

Features and Optional Dependencies

termion: Allows the width and color support of the terminal to be autodetected.

TODOs

  • When impl Trait is stabilized, use impl Display instead of the Display struct.
  • no_std support.
  • Opt-in unicode-width
  • Windows (before 10) support? A good project might be a (&mut Write, &str, Style) -> IoResult<()> function that uses Windows syscalls there and ANSI everywhere else.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A pretty-printing library based on Wadler's "A Prettier Printer" with support for ANSI styling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages