Patrick Burris
Software Developer
WebAssembly From Scratch - Part 2
Building on the last post, this establishes the mental model needed to read and write WAT: a stack-based VM, explicit control flow, and linear memory. By introducing a shared pseudo language, it reframes functions, branching, loops, structs, arrays, and pointers as deliberate layouts and stack operations everywhere.
WebAssembly From Scratch - Part 1
This post is the starting point for a series on writing WebAssembly from scratch. I am not using Rust, C, Zig, or any higher level language. I want to build everything by hand so that the pieces make sense and nothing feels like magic and not just walk you through how to use a toolchain.
TypeScript discriminated unions, and trying to mimic Rust enums
Can we re-create Rust enums in TypeScript? We can try! I show how we can use type unions to mimic some of the behavior of Rust enums, and then take a look at the differences between the TS implementation and the Rust implementation.