suryapandian / rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rust

My learning resources on rust:

Rust tour

Linkedin Learning

Exercism

cargo manages projects rustup manages rust installations

misc learnings

cargo doc --open -> auto generates documents cargo build --release -> the resulting output would go into release folder

  • If the size of the variable is known the the variable is stored in stack
  • If the size is dynamic, the variable is stored in heap.
  • rustc first allocates a memory in the heap and gives the address of the memory, which is then stored in a stack.

:: path operator <> turbo fish operator or angel brackets

  • string can be cleared.
  • borrowing in rust is more or less same as referencing
  • use rand::prelude::* -> imports all basic fucntions from the crate
  • in rust method and functions are different. Methods are functions for a struct.
  • method will always have self as first argument.

The borrow checker is the component in the Rust compiler that enforces data ownership rules, and it enforces these to prevent data races

About


Languages

Language:Rust 94.0%Language:Makefile 6.0%