Zig Next Steps
You’ve made it through the tutorial. You can write Zig programs that allocate memory and free it, handle every error, run code at compile time, talk to C, and build for other machines. That’s a lot. This page is about what comes next: where to keep learning, where to ask questions, what to build, and how to give something back to Zig.
What you’ve learned
Section titled “What you’ve learned”Here’s the whole course on one map. If a part feels shaky, the first lesson of each section is a good place to start again.
| Section | You learned | Start at |
|---|---|---|
| Getting Started | Installing Zig, zig run, the zig tools, syntax, comments and printing |
Zig Get Started |
| Basics | const and var, integers, floats, strings as []const u8, casting, overflow |
Zig Variables |
| Control Flow | if, switch, while, for, labeled blocks, defer, unreachable |
Zig If…Else |
| Functions | Parameters, scope, function pointers, inline |
Zig Functions |
| Arrays, Pointers & Slices | Arrays, *T, [*]T, slices, sentinels, string helpers |
Zig Arrays |
| Structs, Enums & Unions | Structs and methods, enums, tagged unions, tuples, packed structs | Zig Structs |
| Memory | Stack and heap, allocators, arenas, leaks, ownership | Zig Memory Basics |
| Error Handling | Error sets, try/catch, errdefer, optionals, traces, panics |
Zig Errors |
| Comptime & Generics | comptime, generic functions and types, reflection, builtins, vectors |
Zig Comptime |
| Collections | ArrayList, hash maps, sorting, iterators |
Zig ArrayList |
| Building Real Programs | Modules, build.zig, packages, build modes, cross-compiling, args, files, JSON |
Zig Modules & Imports |
| I/O & Concurrency | std.Io, readers and writers, io.async, threads, mutexes |
Zig Io Interface |
| C Interop | C types, calling C libraries, zig cc, exporting to C |
Zig and C |
| Advanced Topics | Interfaces, design patterns, performance, WebAssembly, embedded | Zig Interfaces |
| What You Can Build | Networking, games, CLI tools, real projects | Zig Networking & HTTP |
| Projects | Six complete programs, from a guessing game to an HTTP server | Project: Guessing Game |
| Testing | test blocks, the testing allocator, fuzzing |
Zig Testing |
| Compiler Errors | What the common error messages mean and how to fix them | Zig Errors Explained |
| Practice & Wrap-Up | Exercises, interview questions, style, docs, upgrading | Zig Exercises |
And keep the Zig Cheat Sheet and Zig Keywords open while you work. They’re the two pages people come back to most.
Read the official docs
Section titled “Read the official docs”You’ll use three official sources for as long as you write Zig:
- The language reference for your version. It’s one long page that describes every part of the language, with small tested examples. It’s not a tutorial, but now that you’ve finished one, it reads much more easily. Use Ctrl+F: search for
Optionals,errdeferor@splatand you land on the exact rules. - The standard library docs. Run
zig stdand they open in your browser, generated from the exactstdyou have installed. They’re also online at ziglang.org/documentation/0.17.1/std. These are built from///comments (see Zig Documentation Comments), so the quality varies from function to function. - The release notes for each version (0.17.0 is the current one). Read them when you upgrade, and skim them when a new release comes out to see where Zig is going.
The Learn section on ziglang.org has a few more official pages worth reading once: the overview, a comparison with Rust, D and C++, the build system guide, and short sample programs.
Read the standard library’s source
Section titled “Read the standard library’s source”Here’s a habit that sets good Zig programmers apart: when the docs aren’t enough, they read the source. The standard library ships with the compiler as plain .zig files, so it’s already on your machine. Ask Zig where:
zig envAmong other things, it prints a line like this (your path will differ):
.std_dir = "/home/you/zig-x86_64-linux-0.17.1/lib/std",Open that folder in your editor. mem.zig, array_list.zig and heap/ArenaAllocator.zig are good first reads: they’re well commented, they use everything you’ve learned, and they show you how the people who designed Zig write it. Your editor’s “go to definition” (through ZLS) jumps straight into these files too.
Keep practising
Section titled “Keep practising”- Ziglings: over a hundred small, broken programs that you fix one at a time, from hello world up to comptime, threads and async I/O. It’s the most popular way to practise Zig. Its main branch follows Zig’s development builds (it asked for a 0.18 development build when we checked), so with 0.17.1 use its
v0.17.0tag, as its README suggests:git clone --branch v0.17.0 https://codeberg.org/ziglings/exercises.git. - zig.guide: a community guide with short pages on the language and standard library. When we checked, it was written for Zig 0.15, so much of the I/O and allocator code is older than this site’s. The ideas are still useful; the code needs the changes from Zig Upgrading.
- Our exercises and interview questions, if you skipped them.
- Puzzles like Advent of Code. Their small, well-defined problems are a nice way to get fast at slices, hash maps and parsing.
Join the community
Section titled “Join the community”The Zig community is spread over several places, and the community page on ziglang.org lists them all. The ones you’re most likely to want:
- Ziggit, a forum. The best place for a question that needs code and a longer answer, and its old threads are searchable.
- The Zig Discord (linked from the community page), for quick questions and chat.
- IRC:
#zigonirc.libera.chat. - There are also groups in other languages, Matrix rooms, and an embedded-focused Discord, all on the same page.
The page itself says the community is decentralized: there’s no “official” or “unofficial” space, and each one has its own moderators and rules. Read the rules before you post. When you ask for help, include your Zig version, the smallest code that shows the problem, and the full error message. You’ll get better answers faster.
Contribute to Zig
Section titled “Contribute to Zig”Zig is open source, developed on Codeberg (it moved there from GitHub, so older links point to GitHub). The project’s README has a Contributing section, and a few points from it are worth knowing before you start:
- The easiest way to help is to use Zig. The README says one of the best ways to contribute is to start using Zig for an open-source personal project: you find bugs, and every bug comes with a real reason behind it.
- Writing and talking about Zig counts too. Blog posts, talks, and projects that use Zig all help the ecosystem.
- Language proposals aren’t accepted. Don’t open an issue asking to change the syntax. Bug reports, and patches for issues labelled Contributor Friendly, are the way in.
- Strict no-LLM policy. Issues, patches and comments on the bug tracker must be your own work, not written by an AI tool.
- Zig is run by a non-profit, the Zig Software Foundation, which pays developers from donations. If Zig helps you, that’s another way to give back.
Project ideas
Section titled “Project ideas”The best next step is to build something you actually want. Here are ideas sized for where you are now, with the lessons they lean on:
- A file renamer or organiser: walk a folder, rename files by date or type. File I/O, CLI Arguments, CLI Tools.
- A JSON-to-CSV converter: read JSON, write a table. JSON, Readers & Writers.
- A small key-value store: a hash map in memory, saved to a file on exit. HashMap, File I/O.
- A Markdown-to-HTML converter for a few rules (headings, lists, code). Strings in Depth, Iterators, Testing.
- A tiny interpreter for a calculator language: a tokenizer, a tagged-union syntax tree, an arena for the nodes. Tagged Unions, Arena Allocator.
- A static file web server, building on the HTTP project. Project: HTTP Server, Networking & HTTP.
- Wrap a C library you know (SQLite, zlib, raylib) in a friendly Zig API. Calling C Libraries, Project: Wrap a C Library.
- A game with raylib, or a terminal game. Game Development, Project: Terminal Snake Game.
- Something for WebAssembly that runs in the browser. WebAssembly.
Whatever you pick: start small, get one feature working end to end, write tests as you go, and keep the Style Guide in mind. Put it on Codeberg or GitHub, pin the Zig version in build.zig.zon and the README, and share it on Ziggit. People there like seeing what others build.
Practice
Section titled “Practice”1. Find the standard library on your machine
Section titled “1. Find the standard library on your machine”Find where your Zig’s standard library lives, open mem.zig, and find the function find. What does its doc comment say it returns?
Hint: zig env prints the folder. Search the file for pub fn find(.
Show solution
zig envLook for the .std_dir line, open mem.zig in that folder, and search for pub fn find(. On 0.17.1 it looks like this:
/// Search for needle in haystack and return the index of the first occurrence./// Uses Boyer-Moore-Horspool algorithm on large inputs; linear search on small inputs./// Returns null if needle is not found.pub fn find(comptime T: type, haystack: []const T, needle: []const T) ?usize {It returns the index where needle first starts, or null. Just above it you’ll find pub const indexOf = find; with the comment “Deprecated in favor of find”: the old name, kept for now.
2. Ask a good question
Section titled “2. Ask a good question”You’re stuck on an error. Write the question you’d post on Ziggit. What should it include?
Hint: think about what someone would need to reproduce your problem without asking you anything.
Show solution
A good question includes:
- Your Zig version (
zig version) and your OS. - The smallest program that still shows the problem, as text in a code block, not a screenshot.
- The full error message, copied exactly.
- What you expected to happen, and what you already tried.
Writing it often solves the problem by itself: making the smallest example usually shows you where the mistake is.
- Use the language reference,
zig stdand the release notes for your exact version. - Read the standard library source:
zig envshows where it is, and it’s the best Zig code to learn from. - Practise with Ziglings (use the tag that matches your Zig) and check the version of every guide you read.
- Ask questions on Ziggit, the Discord or IRC, all listed on the official community page.
- Contribute by using Zig, writing about it, and fixing bugs. No language proposals, and no AI-written issues or patches.
- Build something you want, small at first, and share it.
Next up: Zig Cheat Sheet, the syntax from the whole tutorial on one page.
Quick check
Section titled “Quick check”Quick check
Read more
Section titled “Read more”- Zig Learn pages: the official overview, getting started, build system guide and samples.
- Zig community: every forum, chat and regional group, with their rules.
- Ziglings: learn by fixing small broken programs.
- Zig on Codeberg: the source code, issue tracker and the README’s Contributing section.
- Zig Software Foundation: the non-profit behind Zig, and how to support it.