Skip to content

Instantly share code, notes, and snippets.

@101t
Last active November 2, 2024 06:59
Show Gist options
  • Save 101t/89ebfcd58672e46cc9ff64c92dd2a8ae to your computer and use it in GitHub Desktop.
Save 101t/89ebfcd58672e46cc9ff64c92dd2a8ae to your computer and use it in GitHub Desktop.
Best of rust

Rust Tips and Tricks

I wrote my notes here about Rust programming language.

Variables:

Ownership rules

  1. Each value in Rust has a variable that's called its owner.
  2. There can only be one owner at a time.
  3. When the owner goes out of scope, the value will be dropped.

The rules of References

  1. At any given time, you can have either one mutable reference or any number of immutable references.
  2. References must always be valid.

VSCode extensions:

The useful VSCode extensions to get started with powerfull IDE

rust-analyzer
codelldb (debug)
Even Better Toml
dependi
error lens
todo tree
github copilot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment