Rust programming
Install and rustup
- rustup: toolchain manager
- rustc: compiler
- cargo: build & package manager
- crate: smallest compilation unit in Rust (lib/bin)
- crates.io: rust's official package registry
| load rust into shell | |
|---|---|
rust toolchain
A toolchain is a complete Rust environment consisting: - rustc - cargo - Rust standard library - optional components (clippy, rustfmt)
rustup
rustup manages Rust versions, targets, and components on your system.
autocomplete
Add rustup autocomplete
update
update and upgrade toolchain and components
Components
A component is an optional tool that plugs into a Rust toolchain.
- rustfmt: Formatting
- clippy: Linting
Hello world
Simple hello world build and run
- Add aarch target and build it for ARM
Add target
| install rust target | |
|---|---|
| build with aarch target | |
|---|---|