Getting Started with Rust
Programmers should never be chained to one programming language or framework — evolution is the way.
Programmers should never be chained to one programming language or framework — evolution is the way.
What Is Rust Good For, and Where Is It Used?
- Rust's low overhead makes it a great fit for embedded programming
- Rust can build powerful web applications
- Rust is well suited for building distributed online services
- Rust is great for creating powerful cross-platform command-line tools
- Rust has modern development tools and better IDE support
And there are plenty more benefits — what's stopping you from learning it?
Installation
Linux and macOS users:
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
export PATH="$HOME/.cargo/bin:$PATH" ⚠️ If you like, you can download and inspect the script before running it
Update and uninstall:
rustup update // update
rustup self uninstall // uninstall
Compile and run:
rustc --version // check the version
rust *.rs // compile
./main // run
Project management
cargo new PROJECT_NAME // create a new project
cargo build PROJECT_NAME // build the project
cargo build --release // release build
cargo run PROJECT_NAME // run the project
cargo check // check the project: fast