Zig
Full course · 21 lessonsZig is a modern systems programming language focused on robustness, optimality, and maintainability. It offers manual memory management, compile-time computation, seamless C interop, and a first-class cross-compilation toolchain.
Getting Started with Zig
Hello world, zig run, and the build system.
Values and Types
Integers, floats, bools, chars, and explicit casts.
Variables
const vs var, mutation, and type inference.
Operators
Arithmetic, division semantics, bitwise, and logic.
Functions
Explicit signatures, void returns, and function pointers.
Control Flow
if expressions, switch, for, and while loops.
Errors
Error unions, try, catch, and propagation.
Optionals
?T, null, orelse, and if-unwrapping.
Arrays and Slices
Fixed arrays, runtime slices, and bounds checking.
Strings
[]const u8, literals, allocation, and comparison.
Structs
Fields, methods, mutation, and defaults.
Enums and Tagged Unions
Enums, exhaustive switch, and union(enum) payloads.
Pointers
Single-item pointers, const pointers, and optional pointers.
Memory Management
Explicit allocators, defer, realloc, and arenas.
Comptime
Compile-time evaluation, comptime params, and introspection.
Generics
Generic functions and data structures via comptime T.
Modules and Imports
@import, pub declarations, and build.zig wiring.
File I/O
Reading, writing, and iterating with std.fs.
Testing
test blocks, expect, expectError, and test organization.
The Standard Library
std.debug, std.mem, std.ArrayList, and StringHashMap.
Ecosystem and Next Steps
zig fmt, C interop, tooling, and advanced topics.
Free Books
Introduction to Zig (Project-Based)
Open-access book teaching Zig through building a Base64 encoder, HTTP server, and image filter.
zig.guide
Highly structured community introduction walking through core language features step-by-step.
Learning Zig
Concise intro guide making developers comfortable with Zig memory philosophy and syntax.

