It seems especially recently I’ve come across more and more long-form texts (think: hour-long blog posts; free books; series of posts). I especially like the ones that go into the very fine details of some niche topic and maybe also ramble a bit about completely unrelated but highly entertaining asides. And while I will probably never have enough time to read them all, I decided to at least collect some of them here for future reference. I’ll do my best to add summaries, and to update this list semi-regularly.
- “Learn Rust With Entirely Too Many Linked Lists” by Alexis Beingessner
- “Programming Algorithms” by Vsevolod Domkin
- “Aspects of Rust” by multiple people
- “Reading files the hard way” by Amos Wenger
- “Making our own ping” by Amos Wenger
- “Making our own executable packer” by Amos Wenger
- “Parsing” by Aleksey Kladov
- “Crafting Interpreters” by Robert Nystrom
- “A relatively simple Datalog engine in Rust” by Frank McSherry
- “Non-lexical lifetimes” by Niko Matsakis
- “Shifgrethor” by Without Boats
- “Rayon/Parallel Iterators” by Niko Matsakis
- “How Rust optimizes async/await” by Tyler Mandry
- “Writing an OS in Rust” by Philipp Oppermann
- “Learning Parser Combinators With Rust” by Bodil Stokke
- “Manish vs. ASCII” by Manish Goregaokar
- “The Wayland Protocol” by Drew DeVault
“Learn Rust With Entirely Too Many Linked Lists” by Alexis Beingessner
(~180 pages; archived)
The premise of this book is that writing a linked list is a beginner’s exercise in C but quite difficult to get right in Rust. So it takes that as an opportunity to do just what the title says: It teaches you Rust by implementing a linked list type in Rust, in five (as of April 2020) different ways.
Niches: data structures; linked lists; rust; smart pointers
Last update I saw: 2019-03-21
“Programming Algorithms” by Vsevolod Domkin
(~300 pages; archived)
Book covering a lot of different data structures and algorithms. “Its aim is to systematically explain how to write efficient programs and, also, the approaches and tools for determining why the program isn’t efficient enough.”
Niches: data structures; algorithms; lisp
Last update I saw: 2020-04-16
“Aspects of Rust” by multiple people
Several stand-alone posts by various people whose only connection is that they cover nice aspects of Rust.
Whirlwind tour through Rust as a language by Amos Wenger.
By Aleksey Kladov.
The Clone-on-Write smart pointer explained by yours truly.
By Aleksey Kladov.
Some musing on traits and borrows by yours truly.
By Amos Wenger. Introducing the complexities of memory management and the ways Rust tries to represent them in a nice roundabout way.
By yours. By specifying at some later point in the code which type you want your function to return, the compiler can go back and fill in the blanks.
By Amos Wenger. Following the memory management post, this looks at how strings are actually pretty complicated and what Rust does about them.
“Reading files the hard way” by Amos Wenger
Writing files seems like a solved problem. But that doesn’t mean we can’t solve it again from scratch.
Niches: POSIX; file systems; syscalls
- Part 1 (node.js, C, rust, strace) (archived)
- Part 2 (x86 asm, linux kernel) (archived)
- Part 3 (ftrace, disk layouts, ext4) (archived)
“Making our own ping” by Amos Wenger
- A short (and mostly wrong) history of computer networking (archived)
- Windows dynamic libraries, calling conventions, and transmute (archived)
- FFI-safe types in Rust, newtypes and MaybeUninit (archived)
- Designing and implementing a safer API on top of LoadLibrary (archived)
- A simple ping library, parsing strings into IPv4 address (archived)
- The builder pattern, and a macro that keeps FFI code DRY (archived)
- Finding the default network interface through WMI (archived)
- Binding C APIs with variable-length structs and UTF-16 (archived)
- Consuming Ethernet frames with the nom crate (archived)
- Improving error handling - panics vs. proper errors (archived)
- Parsing IPv4 packets, including numbers smaller than bytes (archived)
- Parsing and serializing ICMP packets with cookie-factory. (archived)
- Crafting ARP packets to find a remote host’s MAC address (archived)
- Crafting ICMP-bearing IPv4 packets with the help of bitvec (archived)
“Making our own executable packer” by Amos Wenger
- What’s in a Linux executable? (archived)
- Running an executable without exec (archived)
- Position-independent code (archived)
- ELF relocations (archived)
- The simplest shared library (archived)
- Loading multiple ELF objects (archived)
- Dynamic symbol resolution (archived)
- Dynamic linker speed and correctness (archived)
- GDB scripting and Indirect functions (archived)
- Safer memory-mapped structures (archived)
- More ELF relocations (archived)
- A no_std Rust binary (archived)
- Thread-local storage (archived)
“Parsing” by Aleksey Kladov
Not a real series of articles but a collection of posts by someone whose Github bio reads “Stuck writing parsers”.
- Modern Parser Generator (archived)
- Simple but Powerful Pratt Parsing (archived)
- From Pratt to Dijkstra (archived)
(~530 pages; archived)
Last update I saw: 2019-04-26
“Crafting Interpreters” by Robert Nystrom
(~800 pages; archived)
Last update I saw: 2020-04-05
“A relatively simple Datalog engine in Rust” by Frank McSherry
(~20 pages; archived)
Building a datalog engine in Rust.
“Non-lexical lifetimes” by Niko Matsakis
One of the main features of the Rust language is the concept of ownership and lifetimes. This series of posts by Niko Matsakis, one of the designers of the Rust language, is about the theory and practical implementation of a revamped and more complete way of this in the Rust compiler. It starts in early 2016 and goes all the way to after they feature landed (end of 2018).
- Introduction (archived)
- Non-lexical lifetimes based on liveness (archived)
- Adding the outlives relation (archived)
- Using liveness and location (archived)
- Nested method calls via two-phase borrowing (archived)
- Draft RFC and prototype available (archived)
- An alias-based formulation of the borrow checker (archived)
- MIR-based borrow check (NLL) status update (archived)
- MIR-based borrowck is almost here (archived)
- Interprocedural conflicts (archived)
- Polonius and region errors (archived)
- Polonius and the case of the hereditary harrop predicate (archived)
“Shifgrethor” by Without Boats
A proposed API for a GC in Rust.
- Garbage collection as a Rust library (archived)
- Notes on tracing garbage collectors (archived)
- Rooting (archived)
- Tracing (archived)
“Rayon/Parallel Iterators” by Niko Matsakis
- Rayon: Data parallelism in Rust (archived)
- Parallel Iterators Part 1: Foundations (archived)
- Parallel Iterators Part 2: Producers (archived)
- Parallel Iterators, part 3: Consumers (archived)
“How Rust optimizes async/await” by Tyler Mandry
Niches: compilers; memory layout
“Writing an OS in Rust” by Philipp Oppermann
Niches: operating systems, assembler
- A Freestanding Rust Binary (archived)
- A Minimal Rust Kernel (archived)
- VGA Text Mode (archived)
- Testing (archived)
- CPU Exceptions (archived)
- Double Faults (archived)
- Hardware Interrupts (archived)
- Introduction to Paging (archived)
- Paging Implementation (archived)
- Heap Allocation (archived)
- Allocator Designs (archived)
- Async/Await (archived)
“Learning Parser Combinators With Rust” by Bodil Stokke
(~60 pages; archived)
Assuming you know Rust, this teaches you the fundamentals of parser combinators in a very hands-on way.
“Manish vs. ASCII” by Manish Goregaokar
Several posts on why assuming text is ASCII is unhelpful.
tl;dr you should not index into a Unicode text, like, ever.
Examples for scripts/languages that really don’t work if you assume you have ASCII text.
Fun analysis of a Unicode rendering bug that crashed iOS devices.
“The Wayland Protocol” by Drew DeVault
(~156 pages; archived)
“Wayland is the next-generation display server for Unix-like systems[…] This book will help you establish a firm understanding of the concepts, design, and implementation of [it]”.
Niches: wayland; graphics; protocols; unix