📓
Everything I Know
  • index
  • #
    • 3D Printing
  • A
    • Abandoned Spaces
    • ADHD
    • Aging
    • Algorithms & Data Structures
      • Array
      • Constraint Satisfaction Problem
      • Dynamic Programming
      • Graph
      • Hash Table
      • Heap
      • Linked List
      • Queue
      • Recursion
      • Set
      • Stack
      • Tree
      • Trie
      • Union Find
    • Amazon Web Services
    • Android
    • Anime, Comics & Manga
    • APIs
    • Artificial Intelligence
    • Assembly
      • ARM
      • MIPS
      • x86
    • Audio / Video Editing
    • Awesome
    • Azure
  • B
    • Board Games
    • Books
  • C
    • C (programming language)
    • C++
    • Cars
    • Cascading Style Sheets
    • Chess
    • Comedy
    • Command Line
      • Autotools
      • Awk
      • Bash scripting
      • Grep
      • Lsof
      • Sed
      • SSH
    • Competitive Programming
    • Compilers
    • Computer Graphics
      • OpenGL
      • Vulkan
      • WebGPU
    • Computer Networks
    • Computer Science
    • Concurrency
    • Continuous Integration / Delivery
    • Cooking
    • Cryptography
    • Cryptocurriencies
    • Curriculum Vitae
  • D
    • Databases
      • PostgreSQL
      • SQL
      • SQLite
    • Design Patterns
    • Digital Minimalism
    • Distributed Systems
    • Docker
    • Documentaries
    • Documentation
    • Domain Name System
    • Dopamine
    • Drawing
  • E
    • eCommerce
    • Electronics
      • Repairs
    • Engineering
    • Entrepreneurship
    • Events
  • F
    • Fashion
    • Fitness
      • Exercise
      • Nutrition
      • Weight Loss
    • Focus
    • Football
  • G
    • Game Development
      • Godot
      • LibGDX
      • Unity
      • Unreal Engine
    • Git
    • Goals
    • Guitar
  • H
    • Habits
    • Happiness
    • House
      • Tradespeople
      • Buying
      • Renting
  • I
    • Interviews
      • Behavioural Interviews
      • Coding Interviews
      • System Design Interviews
  • J
    • Java
    • JavaScript
      • Astro
      • Bun
      • Electron
      • Jest
      • Node.js
      • Nue.js
      • React.js
      • Redux
      • Vue.js
    • Journaling
  • K
    • Karting
    • Knots
    • Knowledge Bases
    • Kotlin
    • Kubernetes
  • L
    • LaTeX
    • Learning
      • Drawing
      • Languages
        • Certificate of Proficiency in English
        • Japanese
      • Piano
    • Legacy Code
    • LEGO
    • Lifestyle
    • Life Hacks
    • Linux
    • LISP
  • M
    • Machine Learning
      • Deep Learning
    • MacOS
    • Maths
    • Meditation
    • Movies
    • Music
      • Music Production
      • Music Theory
  • N
    • Negotiation
    • News
  • O
    • Operating Systems
      • Linux
  • P
    • Parenting
    • Personal Finance
      • ISAs
      • Pensions
    • PHP
    • Physics
    • Podcasts
    • Procrastination
    • Productivity
    • Programming
      • Functional Programming
      • Performance
    • Prometheus
    • Psychology
    • Public Speaking
    • Purpose
    • Puzzles
    • Python
      • Django
      • Pandas
  • Q
    • Quantum Computing
    • Quotes
  • R
    • Regular Expressions
    • Relationships
    • Reverse Engineering
    • Rust
      • Cargo
  • S
    • Security
      • Android
      • Binary Exploitation
      • CompTIA Security+ SYO-701
      • CTFs
      • Forensics
      • Linux
      • Web
      • Windows
    • Self Improvement
    • Shaving
    • Sitting
    • Sleep
    • Social Skills
    • Spring (framework)
    • Stoicism
    • Strength Training
      • Deadlifts
      • Push Ups
    • Success
    • System Design
      • Site Reliability Engineering
  • T
    • Table Tennis
    • Testing
    • Thinking
    • Touch Typing
    • Travel
      • Japan
        • Fukuoka
        • Hiroshima
        • Kyoto
        • Okinawa
        • Osaka
        • Tokyo
      • London
      • Rome
    • TV Series & Programmes
    • Twitch
    • TypeScript
    • Typography
  • V
    • Virtual Tours
    • Vim
    • Video Games
      • Emulation
      • Mods
      • Music
      • Speedrunning
      • Warzone
  • W
    • Web Apps
    • Web Cams
    • Web Development
      • Selenium
      • Web Assembly
    • Windows
      • Windows Development
    • Work
      • Freelancing
      • GitHub Profile
      • Interesting Companies
      • Job Boards
      • Remote Work
      • Startup
    • Writing
Powered by GitBook
On this page
  • Notes
  • Ownership
  • References & Borrowing
  • Resources
  • Articles
  • Books
  • Crates
  • Courses
  • GitHub repositories
  • IDEs
  • Libraries
  • Subreddits
  • Websites
  • YouTube channels
  • YouTube playlists

Was this helpful?

  1. R

Rust

https://www.rust-lang.org/

Notes

Ownership

  • There are three rules to ownership in Rust:

    1. Each value has an owner

    2. There is only one owner of a value - other variables may borrow the value

    3. When the owner of a value goes out of scope, the value gets dropped immediately

  • In Rust, we use the term copy when only stack variables are copied; if there is heap data as well we use the term clone

  • When a value is dropped:

    1. the destructor, if available, is immediately run

    2. the heap portion is immediately freed

    3. the stack portion is immediately popped

References & Borrowing

  • A reference to a type is specified using the & (ampersand) notation

  • Rust introduces a concept called lifetimes, which can be summed up as the rule that references must always be valid, which means the compiler will not allow you to create a reference that outlives the value it is referencing, and you can never point to null

  • References are immutable by default, but can be changed to mutale using the &mut notation

  • At any given time, you can have either exactly one mutable reference or any numer of immutable references to a value

Resources

Articles

Books

Crates

Courses

GitHub repositories

IDEs

Libraries

Subreddits

Websites

YouTube channels

YouTube playlists

  • Rust for Java Developers - Jeremy Chone

PreviousReverse EngineeringNextCargo

Last updated 2 months ago

Was this helpful?

- Jarrod Overson

- Amos Wenger

- Jesse Lawson

- Krishna Sundarram

- Raul Jordan (, )

- overexact.com

- Ohad Ravid ()

- Carlos Galdino

- Andrea Bergia

- Philipp Oppermann

- Luca Palmieri

- David Drysdale

- Herbert Wolverson

- Jim Blandy, Jason Orendorff, and Leonora Tindall

- Jon Gjengset

- Tim McNamara

- Steve Klabnik and Carol Nichols

- John Arundel

- Luca Palmieri

- A cargo sub-command to build project dependencies for optimal Docker layer caching

- Statistics-driven micro-benchmarking library

- Build fullstack web, desktop, and mobile apps with a single codebase

- Flexible concrete Error Reporting type built on std::error::Error with customizable Reports

- A command-line benchmarking tool

- A byte-oriented, zero-copy, parser combinators library

- The elegant parser

- A library that's all about cooking up terminal user interfaces

- Simple work-stealing parallelism for Rust

- An implementation of regular expressions for Rust

- Android team, Google

- Lyubomir Gavadinov

- Chris Biscardi

- Richard Feldman

- Rust course taught at FEI VÅ B-TUO

- JetBrains

- Microsoft

()

- safe interop between Rust and C++

- Build interactive web applications in Rust

24 days from node.js to Rust
A half-hour to learn Rust
Getting Started with Rust by Building a Tiny Markdown Compiler
Optimising my Rust solutions for Advent of Code
Rust concepts I wish I learned earlier
HN thread
Reddit thread
Rust for professionals
State of the Crates 2025
Reddit thread
Writing a file system from scratch in Rust
Writing a JVM in Rust
I have written a JVM in Rust
A JVM in Rust part 2 - The class files format
A JVM in Rust part 3 - Parsing class files
A JVM in Rust part 4 - The Java bytecode
A JVM in Rust part 5 - Executing instructions
A JVM in Rust part 6 - Methods and exceptions
A JVM in Rust part 7 - Objects and GC
A JVM in Rust part 8 - Retrospective
Writing an OS in Rust
100 Exercises To Learn Rust
Asynchronous Programming in Rust
Easy Rust
Effective Rust
Hands-on Rust
Learn Rust With Entirely Too Many Linked Lists
Programming Rust
Rust and WebAssembly
Rust for Rustaceans
Rust in Action
The Embedded Rust Book
The Rust Performance Book
The Rust Programming Language
Rust Book Experiment
The Secrets of Rust: Tools
Zero To Production In Rust
cargo-chef
criterion
dioxus
eyre
hyperfine
nom
pest
ratatui
rayon
regex
Comprehensive Rust
Learn Rust by Building Real Applications
Learning Rust by Working Through the Rustlings Exercises
The Rust Programming Language
Awesome Rust
Awesome Rust Books
Black Hat Rust
From JavaScript to Rust eBook
Programming in Rust
py2rs - From Python into Rust
Rust Learning
TheAlgorithms/Rust
Lapce
RustRover
Visual Studio Code
rust-analyzer
GitHub
RustOwl
CXX
r/learnrust
r/rust
Are we game yet?
Are we GUI yet?
Are we learning yet?
Are we web yet?
Leptos
Rust Programming Language
2024 State of Rust Survey Result
Rustfinity
fasterthanlime
Jon Gjengset
From Python to Rust
Introduction
Java 17 side by side
Understanding Ownership