- Basic Hello World program
- Creating a project using cargo
- Commands to create a cargo project
- cargo new hello_cargo
- cd hello_cargo
- To build and Run a Cargo Project:
- cargo build
- ./target/debug/hello_cargo
- To do above 2 steps at once:
- cargo run
- To only compile and not produce binary:
- cargo check
- Building for release:
- cargo build --release
- Variables are immutable by default. Can be made mutable by writing mut keyword before variable name.
- Constants are declared using const keyword. For every const declaration data type must be specified.
- For naming conventions, const variable names must be in uppercase with _ in between for multi word.