Installing Rust on Mac or Ubuntu
Installing
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
C compiler
Mac
xcode-select --install
Ubuntu
apt install build-essential
Hello world
Create directory
mkdir hello
cd hello
Create file main.rs
.
fn main() {
println!("Hello, world!");
}
Compile
rustc main.rs
and run
./main
Links
https://doc.rust-lang.org/book/ch01-01-installation.html
Updated: 2022-04-28