Hacker News new | ask | show | jobs
Show HN: Rust Under the Hood – Explore Rust Through Assembly (amazon.com)
3 points by eventhelix 676 days ago
I'm excited to share my book, "Rust Under the Hood," which explores Rust internals by examining the x86-64 assembly code generated by its compiler.

This book emerged from a series of articles I wrote about Rust and assembly, which you can read here:

https://eventhelix.com/rust/

You can also find the book on Amazon and read a sample here:

https://www.amazon.com/dp/B0D7FQB3DH

What's in the Book?

- Understand how Rust represents enums, tuples, structs, and strings in assembly. Learn about heap operations with Box, Vec, Rc, and Arc.

- Compare static and dynamic dispatch, explore the role of Vtables, and see how closures manage state.

- Dive into loop optimizations, SIMD auto-vectorization, function inlining, and the transformation of async functions into state machines.

Feedback and discussions are welcome!