Get under the hood of Rust Language with Assembly!! Rust Programming Tutorial
If you want to truly understand how Rust works and what happens under the hood, it's worth learning the assembly that rust generates during the compile. By understanding Rust Assembly you can truly understand Rust Programming and become a master of the Rust Language (RustLang). By the end of this video, you'll understand how to generate assembly from rust, how stack memory allocation works in rust programming and how rustlang is represented in assembly. You'll even be comfortable with assembly language statements, registers, stack and memory storage, and be able to walkthrough rust generated assembly yourself. In this video we take a simple rust program and we convert it to assembly on your machine using native compilation (apple silicon) and cross compiling to x64 and emitting intel assembly. In addition we use a simple online tool called godbot which makes it easier to understand the assembly. We then take our simple rust program and break down the generated assembly line by line, so understand what's happening underneath the hood. Understanding assembly Language and the assembly rust generates will help you on that journey to becoming and Advanced Rust Programming expert. 00:00 - introduction 01:03 - create our rust project 03:36 - target folder and rust compile 04:27 - emitting rust assembly during compile 05:42 - cross compiling rust from apple silicon arm to x64 assembly 08:26 - emitting x64 assembly 09:10 - cargo show asm 09:23 - emitting rust assembly interleaved with rust using cargo show asm 11:10 - generating x64 intel assembly using rust and godbolt 12:30 - understanding stack frame memory allocation, stack pointer, rsp and sub 14:22 - variable assignment, mov and virtual registers 15:45 - assembly multiplication using imul 17:30 - storing local variables in the stack / stack frame memory for later use 19:10 - overflow checks and panickibng 21:10 - more calculations and some compiler optmizations 22:11 - understanding stack memory and primitive sizes and fixed memory 23:48 - jmp's are goto's in disguise 24:20 - more stack memory and compiler optimizations 27:45 - printing the result 28:08 - To Be Continued

How RUST Primitive Types and Functions REALLY Work Under the Hood in Rust Programming with Assembly

Rust Before Main - Ryan Levick - Rust Linz, July 2022

MoE Models Exposed | Position vs Context

Fixing HORRIBLE Embedded Rust So You Don’t Have To

Why Hello World in Rust is 200 times bigger than in C, and why it isn't

The Truth about Rust/WebAssembly Performance

Learning Rust the wrong way - Ólafur Waage - NDC TechTown 2022

Rust Tutorial Full Course

A Firehose of Rust, for busy people who know some C++

"Type-Driven API Design in Rust" by Will Crichton
![Visualizing memory layout of Rust's data types [See description/first comment]](https://i.ytimg.com/vi/rDoqT-a6UFg/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLB-GvR1n9ioPGtoA8r8995OyqDUWQ)
Visualizing memory layout of Rust's data types [See description/first comment]

Rust is not a faster horse

How C++ Works: Name Mangling, RAII, RVO & More

rust runs on EVERYTHING (no operating system, just Rust)

Understanding Ownership in Rust

Rust: Generics, Traits, Lifetimes

LLMs Don’t Calculate - They Just Remember Everything

Rust for the impatient

How I learned Unity without following tutorials (Developing 1)

