ansi-builder 0.1.6

Rust crate that will have tools to construct ansi control sequences.

ANSI Builder

ANSI builder is a library that allows you to build and execute ansi control sequences. This repository is currently a work in progress and might have frequent changes to design (will try to keep design changes to a minimum).

Platform Support

  • Linux
  • OSX
  • Windows (tested on Windows 10)


More details on using the library can be found in the examples/ directory. Also is on of our projects that use this.

Change color example

use ansi_builder::AnsiBuilder;

    .text("This text will be red")
    .print() // prints out what we currently have to the terminal.
    .text("this text will be default)
    .println(); // prints out what we have to the terminal and goes to next line.

Cursor example

use ansi_builder::AnsiBuilder;

    .cursor().save() // saves current cursor positon
    .text("just writing stuff")
    .text("more stuff")
    .cursor().restore() // brings cursor where we saved