← Languages

Zig

Full course · 21 lessons

Zig 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.

Knowledge Course
01

Getting Started with Zig

Hello world, zig run, and the build system.

20 min→
02

Values and Types

Integers, floats, bools, chars, and explicit casts.

25 min→
03

Variables

const vs var, mutation, and type inference.

25 min→
04

Operators

Arithmetic, division semantics, bitwise, and logic.

25 min→
05

Functions

Explicit signatures, void returns, and function pointers.

30 min→
06

Control Flow

if expressions, switch, for, and while loops.

30 min→
07

Errors

Error unions, try, catch, and propagation.

35 min→
08

Optionals

?T, null, orelse, and if-unwrapping.

30 min→
09

Arrays and Slices

Fixed arrays, runtime slices, and bounds checking.

30 min→
10

Strings

[]const u8, literals, allocation, and comparison.

30 min→
11

Structs

Fields, methods, mutation, and defaults.

30 min→
12

Enums and Tagged Unions

Enums, exhaustive switch, and union(enum) payloads.

35 min→
13

Pointers

Single-item pointers, const pointers, and optional pointers.

30 min→
14

Memory Management

Explicit allocators, defer, realloc, and arenas.

45 min→
15

Comptime

Compile-time evaluation, comptime params, and introspection.

40 min→
16

Generics

Generic functions and data structures via comptime T.

40 min→
17

Modules and Imports

@import, pub declarations, and build.zig wiring.

30 min→
18

File I/O

Reading, writing, and iterating with std.fs.

30 min→
19

Testing

test blocks, expect, expectError, and test organization.

30 min→
20

The Standard Library

std.debug, std.mem, std.ArrayList, and StringHashMap.

30 min→
21

Ecosystem and Next Steps

zig fmt, C interop, tooling, and advanced topics.

20 min→
Curated Resources