This is fast food, No more detailed explanation.
Open your terminal. Just type and type a dozen of commands as below:
//download curl software
sudo apt-get install curl
//using curl to download rust
curl https://sh.rustup.rs -sSf | sh
//type 1 to install Rust by default
//after install completely, set PATH environment
source ~/.profile
source ~/.cargo/env
//Check version
rustc --version
//Write the first program
//Create directory
mkdir rs_dir
cd rs_dir
//Open vi editor to write source code
vi first_proc.rs
//Copy and paste below code in vi editor
fn main()
{
println!("Hello World again!");
}
//Save source code by vi manipulators with a keyboard.
press "i"
press "shift+insert"
press ":"
type wq
enter
//compile source code
rustc first_proc.rs
//run first program
./first_proc.rs
More detail, please check out below references:
https://www.rust-lang.org/tools/install
https://www.tecmint.com/install-rust-programming-language-in-linux/
Hope it help!
Open your terminal. Just type and type a dozen of commands as below:
//download curl software
sudo apt-get install curl
//using curl to download rust
curl https://sh.rustup.rs -sSf | sh
//type 1 to install Rust by default
//after install completely, set PATH environment
source ~/.profile
source ~/.cargo/env
//Check version
rustc --version
//Write the first program
//Create directory
mkdir rs_dir
cd rs_dir
//Open vi editor to write source code
vi first_proc.rs
//Copy and paste below code in vi editor
fn main()
{
println!("Hello World again!");
}
//Save source code by vi manipulators with a keyboard.
press "i"
press "shift+insert"
press ":"
type wq
enter
//compile source code
rustc first_proc.rs
//run first program
./first_proc.rs
More detail, please check out below references:
https://www.rust-lang.org/tools/install
https://www.tecmint.com/install-rust-programming-language-in-linux/
Hope it help!
Comments
Post a Comment