Learning to code in Rust programming language
These are sample programs created using cargo build and package management system.
The source directory will contain all the examples, exercises and more from the book The Rust Programming Language
-
Steve Klabnik_ Carol Nichols - The Rust Programming Language, 2nd Edition-No Starch Press (2022).pdf
-
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh- To install Rust, Linux or macOS -
rustup update- To update Rust -
rustup self uninstall- To uninstall Rust -
rustc --version- To check version of Rust C -
rustup --version- To check version of Rustup -
cargo --version- To check version of Cargo -
rustup doc- To get local documentation -
cargo doc --open- To generate the doc locally and viewed in browser -
To create a new project run,
cargo new <project_name>cargo new hello-rust
-
To build the project run,
cargo build -
To run the project,
cargo run -
To add dependencies run,
cargo add <crate_name>cargo add ferris-says
-
To check for compilation errors and not create a binary file run,
cargo check
- Rust Foundation
- Rust Language
- Rust Blog
- The Cargo Book
- Rust Package Registry
- Rust Standard Library
- Rust Edition Guide
- Rustdoc
- Rustc
- Rust Error Codes
- Rust Command Line Book
- Rust Webassembly Book
- Rust Embedded Book
- Rust Reference
- Rustonomicon
- Rust Unstable Book
- Rust Forge
- Rust TOML Files
- Rust Comments Section
- Rust Commenting Conventions
The hello-rust and hello-cargo are projects created using cargo build system and package manager for Rust. This is to simulate the properties of creating a project using cargo.