Skip to content

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.

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.

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, errdefer or @splat and you land on the exact rules.
  • The standard library docs. Run zig std and they open in your browser, generated from the exact std you 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.

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:

Terminal window
zig env

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

  • 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.0 tag, 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.

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: #zig on irc.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.

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.

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:

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.

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
Terminal window
zig env

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

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 std and the release notes for your exact version.
  • Read the standard library source: zig env shows 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

1. How do you open the standard library docs for the exact Zig version you have installed?
2. You are on Zig 0.17.1 and want to do Ziglings. What should you do?
3. Which of these does the Zig project NOT accept?

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