curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
codium --install-extension rust-lang.rust-analyzer
codium --install-extension jscearcy.rust-doc-viewer
#1yib.rust-bundle
cargo new exercise01
cd exercise01
cargo run
cargo build --release
cargo build --debug
cargo check
cargo.toml
contains dependencies
**/target/
Cargo.lock
can use if traditionally, or as a conditional in another statemtent
continue keyword is a companion to break
you can iterate through 1..5 or lists: [1,2,3] with for
match is a simplified switch
/case
statement
loop keyword just loops forever
let
keyword sorts out datatypes later.
last line of functions is the return if you omit the semicolon – return can still be used
“unit type” is an empty tuple
built in functions / macros I’ve discovered dbg! println! assert! assert_eq! assert_ne! debug_assert! mut todo! format! unreachable! eprintln!
variables are immutable by default
constants and variables are different
const