# Verify installation
rustc --version
cargo --version
# Run
cargo run --bin hello
# Cloning this repo
git clone [email protected]:t4sk/hello-rust.git
cd hello-rust
cargo build
- Install cargo
- Hello world
-
println!
- Variable
- Immutable by default
let
mut
- Constant
- Shadowing
- Type placeholder
_
- Scalar types
i32
,u32
,f32
,bool
,char
- Type conversion
- Min and max value
- Integer overflow
- Compound data types
- String
r#
usize
format!
- Enum
Option
Result
derive(Debug, PartialEq)
- Struct
- Update syntax
- Struct method (
impl
)Self
,self
- Associated function (static method)
- Methods (functions called on a particular instance of type)
- Operators
- Math
- Bool
- Comparison
- Bitwise