In this repository, you can find some steps to start learning Rust languague. Mostly, it uses youtube platform playlist to get the knowledge but also can be some useful portals
- systems programing language which meant for low-level software, OS, web-browsers, foundational software... Sometimes is also good option to build high-level software but is focused in low-level.
- Sometimes might be difficult because we have to care about low-level details.
- Statically typed programing language. Rust compiler will infer all of the types of the args, binding, ...
- It is not object oriented program language, there is nothing like classes. In rust usually are
struct
s
cargo new [project-name]
.toml
is the manifest file of the project
Like in all binary files, the main function is main
function
- typecheck:
cargo check
. It does not create the binary - Create the binari: First, it does type check after, build the binary file:
cargo build
- Release binary:
cargo build --release
- Run the binary: It builds the binary and after runs the binary.
cargo run
- To check the trace of the error:
RUST_BACKTRACE=1 cargo run
- Test library with output:
cargo test -- --show-output
rust-analyzer
: Rust language server
- target: All the build artifact are there, including, end binary
- debug: we will find our end binary. In the case of ryan-levick/kvstore, the binary will be
kvstore
- release: Create a release binary
- debug: we will find our end binary. In the case of ryan-levick/kvstore, the binary will be
- Cargo.lock: It explains to cargo the lock versions of the dependencies
- env: usually heavier files because it has debug files
- release: lighter because the compiler does not do as many optimisation
- Each value in Rust has a variable that's called its owner
- There can only be one owner at a time
- When the owner goes out of scope, the value will be dropped
- At any given time, we can have either one mutable reference or any number of immutable references
- References must always be valid
- Cargo Book: Cargo is the Rust package manager
- Learn Rust: Rust official documentation
- The Rust reference: This book does not serve as an introduction to the language. Background familiarity with the language is assumed
- Crates.io: The Rust community’s crate registry
- Rust by example: Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries
- Rust Async Book
- Rust Standard library: API reference
- Rust by Practise: This book was designed for easily diving into and get skilled with Rust, and it's very easy to use: All you need to do is to make each exercise compile without ERRORS and Panics !
- Docs rs: Docs.rs is an open source documentation host for crates
- Rust Playground
- Rust Language Cheat Sheet: A single-page Rust resource for people who like high information density.
- Ideomatic Rust: A peer-reviewed collection of articles/talks/repos which teach concise, idiomatic Rust.
- Rustlings: Small exercises to get you used to reading and writing Rust code!
- Take your first steps with Rust
- Curso de Rust para desarrolladores JavaScript
- Ryan Levick's, Introduction to Rust
- Let's get Rusty's, The Rust Lang Book
- Rust Tutorial, Doug Milford
- Derek Banas, Rust tutorial full course
- Pointers and dynamic memory - stack vs heap
- Visualizing memory layout of Rust's data types
- Jeff No Zhao
- SurrealDB: It is the ultimate cloud database for tomorrow's applications
- Rust for Rustaceans: by Jon Gjengset
Programming Rust
: Fast, Safe Systems Development by Jason Orendorff, Jim Blandy, and Leonora F.S. TindallThe Rust Programming Language
by Steve Klabnik and Carol Nichols