Odin · interactive explainers

Learn Odin

29 interactive lessons. Each opens at level 1 — what happens — and climbs to the payoff. Every byte, size, and output on the page is verified against a real Odin compile. Pick any lesson to start.

Getting started
1Setup checkIs your toolchain healthy? 2Hellope!The smallest program, taken apart 3Packages & importsHow folders become a program
Core types
4Types & printingBit-widths and the print verbs 5ProceduresOne call, many return values 6Strings & runesA view over UTF-8 bytes 7Fixed arrays[N]T laid out flat in memory 8Enums & bit setsOne bit per member
Slices & pointers
9SlicesA 16-byte window onto memory 10PointersAddresses, aliasing, and ^T 11Parameters & passingWhat a proc can and can't change
Dynamic data & scope
12Dynamic arraysGrowth, capacity, and ownership 13deferCleanup that fires at scope exit 14MapsKeys, and the silent zero value 15Stack & heapWhere your values actually live
Memory & allocators
16Context & allocatorsThe implicit allocator, threaded in 17Arena allocatorOne bump cursor, freed all at once
The type system
18Tagged unionsOne slot, many shapes, a tag 19Distinct typesSame bytes, a brand-new name 20Errors & or_returnErrors as values, desugared 21Structs & SoAArray-of-structs vs struct-of-arrays 22using & proc groupsFlattening names; overload sets 23Procedures as valuesA proc held in a variable slot 24Parametric polymorphismOne source, many type stamps
Systems & workflow
25Foreign bindingsCalling across the C ABI line 26when & build flagsBranches the compiler resolves 27Testingcore:testing, pass and fail 28Hot reloadSwap code while it runs 29Search-driven learningLook it up instead of guessing