How to get started with rust
How to I install rust?
See https://www.rust-lang.org/tools/install
Or run:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
How do I compile a rust program?
Use rustc
E.g. rustc main.rs
The output is a binary main
.
Where does rust/cargo store dependencies
In you ~/.cargo/registry/
directory.
What is Cargo.toml
?
It lists the details of your program/package and its dependencies.
What is Some
in Rust?
Everything has a value in Rust (aka, a strongly typed language).
So Some may be used when assigning a variable to a value when may have a value of something, or nothing/None (no value).