$ sudo apt-get update
$ sudo apt-get -y upgrade
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source $HOME/.cargo/env
$ cargo new cli
Created binary (application) `cli` package
$ cd cli
Below is the content of the src/main.rs file.
use std::env;
fn main() {
let args: Vec<String> = env::args().collect();
println!("{}", String::from("Hello ") + &args[1]);
}
$ cargo build --release
$ target/release/cli Rust
Hello Rust