diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..0b85a8f --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "RustCLI" +version = "0.0.1" +description = "Rust CLI" +repository = "https://github.com/GuilhermeWerner/RustCLI" +authors = ["GuilhermeWerner "] +license = "MIT" +edition = "2018" +publish = false + +[[bin]] +name="Console" +path = "Source/Console.rs" diff --git a/Source/Console.rs b/Source/Console.rs new file mode 100644 index 0000000..e3798f0 --- /dev/null +++ b/Source/Console.rs @@ -0,0 +1,20 @@ +// Copyright (c) TribuFu 2015-2020. All Rights Reserved + +#![allow(non_snake_case)] + +use std::io::{self, Read}; + +fn main() { + println!("Hello World"); + + loop { + let mut input = String::new(); + + match io::stdin().read_line(&mut input) { + Ok(n) => { + print!("{}", input); + } + Err(error) => panic!("{}", error), + } + } +}