You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nabil Boutemeur 795d3ecf77
Merge pull request #2 from repi/patch-1
1 year ago
examples Added example 1 year ago
src Remove unused code 1 year ago
.gitignore initial commit 1 year ago
.gitlab-ci.yml Added GitlabCI configuration 1 year ago
Cargo.toml Update license in Cargo.toml 1 year ago
LICENSE Change license to MIT 1 year ago Fix README incorrect license reference 1 year ago
appveyor.yml Fix for AppVeyor config 1 year ago
Released API docs
MIT Licensed
AppVeyor CI
pipeline status


This simple crates allows developers to enable ANSI escape characters in Windows’ console, be it CMD or PowerShell. Its usage is very simple, as shown below:

extern crate output_vt100;

fn main() {
    println!("\x1b[31mThis text is red!\x1b[0m");

If you wish to ensure the output_vt100::init() function is only ran once, you can use the crate ctor. Be aware though it might not be suited for every use case, as explained on the crate’s presentation.

extern crate output_vt100;
extern crate ctor;
use ctor::*;

fn init_term() {

fn main() {
    println!("\x1b[31mThis text is red!\x1b[0m");

Not that init panics on error, if you do not wish to panic, use
output_vt100::try_init which returns a Result<(), ()>


A big thank you to nbouteme who helped me a lot during the development of this create.