How to kickstart your rust learning journey on macos


Install rust

brew install rustup

Install rustc and cargo

rustup-init

Check if everything is alright

rustc --version
cargo --version

Start a new rust project

cargo new <project_name_provide_your_own>

Run the project generated by cargo

cd <project_name_you_provided_in_the_previous_step>
cargo run

Run changes to your code automatically, i.e. on watch mode

This one needs a package called cargo-watch

cargo install cargo-watch

and

cargo watch -x run

or

cargo watch -x build

Happy rusting!