YoVDO

Under the Hood of Rust Language with Assembly - Rust Programming Tutorial

Offered By: Chris Hay via YouTube

Tags

Rust Courses Assembly Language Courses

Course Description

Overview

Dive deep into the inner workings of Rust by exploring its assembly language output in this comprehensive 28-minute tutorial. Learn how to generate assembly from Rust code, understand stack memory allocation, and decipher Rust's representation in assembly. Gain proficiency in assembly language statements, registers, stack and memory storage, and walk through Rust-generated assembly step-by-step. Convert a simple Rust program to assembly using native compilation for Apple Silicon and cross-compilation to x64, utilizing tools like Godbolt for easier comprehension. Analyze the generated assembly line-by-line, uncovering the underlying processes. Master advanced concepts such as stack frame memory allocation, variable assignment, multiplication in assembly, overflow checks, compiler optimizations, and more. By the end, you'll have a solid foundation for becoming an advanced Rust programming expert with a deep understanding of its low-level operations.

Syllabus

- introduction
- create our rust project
- target folder and rust compile
- emitting rust assembly during compile
- cross compiling rust from apple silicon arm to x64 assembly
- emitting x64 assembly
- cargo show asm
- emitting rust assembly interleaved with rust using cargo show asm
- generating x64 intel assembly using rust and godbolt
- understanding stack frame memory allocation, stack pointer, rsp and sub
- variable assignment, mov and virtual registers
- assembly multiplication using imul
- storing local variables in the stack / stack frame memory for later use
- overflow checks and panickibng
- more calculations and some compiler optmizations
- understanding stack memory and primitive sizes and fixed memory
- jmp's are goto's in disguise
- more stack memory and compiler optimizations
- printing the result
- To Be Continued


Taught by

Chris Hay

Related Courses

The Rust Programming Language
Udemy
Rust for Beginners: Learn Rust in 4 Hours
Udemy
Rust For Undergrads
Udemy
Take your first steps with Rust
Microsoft via Microsoft Learn
Rust Fundamentals
Pluralsight