diff --git a/Cargo.lock b/Cargo.lock index 305c5fb..ae25b42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1885,6 +1885,7 @@ dependencies = [ name = "rust_nuggets" version = "0.1.0" dependencies = [ + "ansi_term", "dotenvy", "error-chain", "futures-util", diff --git a/Cargo.toml b/Cargo.toml index e04551f..ed84829 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,3 +21,4 @@ tokio = { version = "1.36.0", features = ["full"] } sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git" } sp1-core = { git = "https://github.com/succinctlabs/sp1.git" } num = "0.4" +ansi_term = "0.12.1" diff --git a/src/main.rs b/src/main.rs index 3763fdd..63665d4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,6 @@ +use ansi_term::Colour::{Blue, Cyan, Green, Purple, Red, Yellow}; +use ansi_term::Style; + fn main() { println!("Hello, this is collection of rust stuff!"); println!("Feel free to look in the bin folder and explore all the cool stuff"); @@ -13,4 +16,18 @@ fn main() { "{}hi{} there, {}this{} is a {}cool{} message", c.1, c.0, c.2, c.0, c.3, c.0 ); + let mut style = Style::new(); + style.bold(); + style.underline(); + style.background = Some(Blue); + println!( + "{}{}{}{}{}{}{}", + Blue.paint("Hi"), + Green.paint(" there"), + Red.paint(" this"), + Yellow.paint(" is"), + Cyan.paint(" a"), + Purple.paint(" cool message\n"), + style.paint("Rust is fookin' awesome!") + ); }