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.

Contents

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.

Niches: rust

  1. A half-hour to learn Rust (archived)

    Whirlwind tour through Rust as a language by Amos Wenger.

  2. Diving into Rust with a CLI (archived)

    Small tutorial by Kevin Knapp on how to write a XKCD downloader tool in Rust.

  3. Typed Key Pattern (archived)

    By Aleksey Kladov.

  4. The Secret Life of Cows (archived)

    The Clone-on-Write smart pointer explained by yours truly.

  5. Newtype Index Pattern (archived)

    By Aleksey Kladov.

  6. How to implement a trait for &str and &[&str] (archived)

    Some musing on traits and borrows by yours truly.

  7. Declarative memory management (archived)

    By Amos Wenger. Introducing the complexities of memory management and the ways Rust tries to represent them in a nice roundabout way.

  8. Return-type based dispatch (archived)

    By yours truly. 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.

  9. Working with strings in Rust (archived)

    By Amos Wenger. Following the memory management post, this looks at how strings are actually pretty complicated and what Rust does about them.

  10. Writing Non-Trivial Macros in Rust (archived)

    By Michael F. Bryan.

Command Line Applications in Rust” by Pascal Hertleif

(~45 pages; archived)

A tutorial on how to write CLI apps in Rust, learning many aspects of the ecosystem along the way.

Last update I saw: 2020-06-12

“Learn Rust the Dangerous Way” by Cliff L. Biffle

Rust explained for low-level developers without a CS background. If you’ve been writing firmwares or kernels or game engines and want to dip your toes into Rust, this a good start. Full index of series here.

Niches: rust; systems programming; memory management

  1. Why Learn Rust the Dangerous Way? (archived)
  2. You Can’t Write C in Just Any Ol’ Language (archived)
  3. References Available Upon Request (archived)
  4. Measure What You Optimize (archived)
  5. A More Perfect Union (archived)
  6. Making Safe Things From Unsafe Parts (archived)
  7. Let The Compiler Do The Work (archived)

“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

  1. Part 1 (node.js, C, rust, strace) (archived)
  2. Part 2 (x86 asm, linux kernel) (archived)
  3. Part 3 (ftrace, disk layouts, ext4) (archived)

“Making our own ping” by Amos Wenger

  1. A short (and mostly wrong) history of computer networking (archived)
  2. Windows dynamic libraries, calling conventions, and transmute (archived)
  3. FFI-safe types in Rust, newtypes and MaybeUninit (archived)
  4. Designing and implementing a safer API on top of LoadLibrary (archived)
  5. A simple ping library, parsing strings into IPv4 address (archived)
  6. The builder pattern, and a macro that keeps FFI code DRY (archived)
  7. Finding the default network interface through WMI (archived)
  8. Binding C APIs with variable-length structs and UTF-16 (archived)
  9. Consuming Ethernet frames with the nom crate (archived)
  10. Improving error handling - panics vs. proper errors (archived)
  11. Parsing IPv4 packets, including numbers smaller than bytes (archived)
  12. Parsing and serializing ICMP packets with cookie-factory. (archived)
  13. Crafting ARP packets to find a remote host’s MAC address (archived)
  14. Crafting ICMP-bearing IPv4 packets with the help of bitvec (archived)

“Making our own executable packer” by Amos Wenger

  1. What’s in a Linux executable? (archived)
  2. Running an executable without exec (archived)
  3. Position-independent code (archived)
  4. ELF relocations (archived)
  5. The simplest shared library (archived)
  6. Loading multiple ELF objects (archived)
  7. Dynamic symbol resolution (archived)
  8. Dynamic linker speed and correctness (archived)
  9. GDB scripting and Indirect functions (archived)
  10. Safer memory-mapped structures (archived)
  11. More ELF relocations (archived)
  12. A no_std Rust binary (archived)
  13. 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”.

Niches: parsers

  1. Modern Parser Generator (archived)
  2. Simple but Powerful Pratt Parsing (archived)
  3. From Pratt to Dijkstra (archived)

JavaScript Allongé” by Reg “raganwald” Braithwaite

(~530 pages; archived)

Niches: functional programming; obscure JavaScript

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.

Niches: datalog

“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).

  1. Introduction (archived)
  2. Non-lexical lifetimes based on liveness (archived)
  3. Adding the outlives relation (archived)
  4. Using liveness and location (archived)
  5. Nested method calls via two-phase borrowing (archived)
  6. Draft RFC and prototype available (archived)
  7. An alias-based formulation of the borrow checker (archived)
  8. MIR-based borrow check (NLL) status update (archived)
  9. MIR-based borrowck is almost here (archived)
  10. Interprocedural conflicts (archived)
  11. Polonius and region errors (archived)
  12. Polonius and the case of the hereditary harrop predicate (archived)

“Shifgrethor” by Without Boats

A proposed API for a GC in Rust.

  1. Garbage collection as a Rust library (archived)
  2. Notes on tracing garbage collectors (archived)
  3. Rooting (archived)
  4. Tracing (archived)

“Rayon/Parallel Iterators” by Niko Matsakis

Niches: concurrency

  1. Rayon: Data parallelism in Rust (archived)
  2. Parallel Iterators Part 1: Foundations (archived)
  3. Parallel Iterators Part 2: Producers (archived)
  4. Parallel Iterators, part 3: Consumers (archived)

“How Rust optimizes async/await” by Tyler Mandry

Niches: compilers; memory layout

  1. Part I (archived)
  2. Part II: Program analysis (archived)

“Writing an OS in Rust” by Philipp Oppermann

Niches: operating systems, assembler

  1. A Freestanding Rust Binary (archived)
  2. A Minimal Rust Kernel (archived)
  3. VGA Text Mode (archived)
  4. Testing (archived)
  5. CPU Exceptions (archived)
  6. Double Faults (archived)
  7. Hardware Interrupts (archived)
  8. Introduction to Paging (archived)
  9. Paging Implementation (archived)
  10. Heap Allocation (archived)
  11. Allocator Designs (archived)
  12. 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.

Niches: parsers

“Manish vs. ASCII” by Manish Goregaokar

Several posts on why assuming text is ASCII is unhelpful.

Niches: unicode

  1. Let’s Stop Ascribing Meaning to Code Points (archived)

    tl;dr you should not index into a Unicode text, like, ever.

  2. Breaking Our Latin-1 Assumptions (archived)

    Examples for scripts/languages that really don’t work if you assume you have ASCII text.

  3. Picking Apart the Crashing iOS String (archived)

    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