Getting Started with Rust
Rust is a systems programming language focused on safety and performance 🦀. In this first post of the series we set up a toolchain[1] and write our very first program.
Installing the toolchain
Install rustup, then confirm the compiler is available:
rustup default stable
rustc --versionDon't mix a distro-packaged
rustcwithrustup; conflicting toolchains cause confusing version errors.
Hello, world
Every journey starts somewhere:
fn main() {
println!("Hello, world!");
}Prefer
cargo runover callingrustcdirectly — Cargo builds and runs in one step.
In the next installment we dig into traits.rustup is the official Rust toolchain installer and version manager. ↩
zolt