Skip to content

zouyee/zig-learning

Repository files navigation

zig-learning Build Status

A bunch of links to blog posts, articles, videos, etc for learning Zig. Feel free to submit a pull request if you have some links/resources to add. Also, I try to verify that the articles below have some real content (i.e. they aren't 2 paragraph long blog posts with little information) to ensure I'm not listing "fluff" pieces. If you have an idea for a better way to organize these links, please let me know. Inspired by rust-learning.

Introduction

Do you want to be convinced that Zig is worth learning? Let us show you the Comparison).

The main documentation is always the best beginning, so if you haven't read it yet, start by reading the Zig learn). Online learning resources at zig.guide and ziglings exercises.

Tag meanings

  • ⭐ Something made by repo owner member.
  • 🔚 Concepts are still useful but code could not compile.
  • 🔜 Work In Progress.

Table of Contents

Books

  • Zig Programming Language - An introductory book on Zig, covering the basics to advanced topics.
  • zig-cookbook - Simple Zig programs that demonstrate good practices to accomplish common programming tasks.

Videos

Playlists

Presentations

Podcasts

Zig in practice

Best Practices/Style Guides

Cheat sheets

  • Syntax Index - Official documentation covering Zig's syntax and key concepts.
  • Community Zig Tutorials - A portal for discovering new Zig tutorials and community-driven content.
  • Zig Cheat Sheet - A handy reference guide with key Zig programming concepts and syntax patterns, created by a Zig community member.
  • Zig Language Patterns - Best practices and design patterns written by Andrew Kelley, the creator of Zig.
  • Zig Learn - A community-maintained guide for beginners, offering an introduction to Zig's core features with practical examples.
  • Zig Memory Management Guide - Useful tips and tricks for managing memory safely and efficiently in Zig.
  • Zig Playground - An online environment for experimenting with Zig code snippets and testing ideas quickly.
  • Zig Standard Library Overview - A detailed overview of Zig's standard library, ideal for understanding built-in utilities and functions.

Zig internals

  • Codeberg Repository - Official Zig repository after migrating from GitHub to Codeberg (November 2025)
  • Zig 0.16.0 Release Notes - Major release with I/O as Interface, Juicy Main, and incremental compilation improvements
  • Zig Community Forum - A discussion platform for Zig language design, development news, and technical questions.
  • Zig Documentation - The official and comprehensive documentation for understanding Zig’s features and syntax.
  • Zig Proposals - A collection of Zig’s proposed RFCs (Request for Comments) for proposals.

Compilation

  • Zig Compilation Guide - Zig official documentation. This guide provides detailed information on how to set up compilation with Zig. It includes basic steps, toolchain setup, and target options.

  • Zig for Raspberry Pi - A community-driven project that shows how to cross-compile Zig programs for the Raspberry Pi, with a setup for cross-compiling Zig on Linux.

  • Zig Cross Compilation for macOS - This project allows you to cross-compile code on Linux that will be executed on macOS.

  • Compile Cargo project with zig - It is a tool that facilitates building Rust projects with the Zig toolchain, enabling cross-compilation and optimizations that are typically more straightforward than using Rust's native toolchain alone.

FFI

  • Using Zig with C: Interop Guide - The official Zig documentation for C interop. Zig provides seamless integration with C, allowing you to call C functions directly and link against C libraries without needing additional tooling.

  • Zig and Node.js: Writing Native Modules - A GitHub issue tracking the integration of Zig with Node.js for native modules. It discusses potential setups for creating fast, native Node.js modules using Zig.

  • Cross-compiling Zig for Mobile Platforms (Android/iOS) - A tutorial by Andrew Kelley on cross-compiling Zig for Android, including setup instructions and guidance on building shared libraries. Though there isn't a direct iOS equivalent yet, the process can be adapted similarly.

  • Zig and Dynamic Libraries: Working with .so and .dll - A blog post that explores how to build dynamic libraries (.so and .dll) using Zig. This is particularly useful when you need to create shared libraries for FFI purposes.

  • Integrating Zig with Rust for FFI - A tutorial on how to create a Rust-Zig integration, using Zig’s FFI to enhance performance or utilize Zig’s unique features.

CI / Testing

  • Setting up Zig with GitHub Actions - A detailed guide on using GitHub Actions for Zig projects. It covers basic configurations for running tests and building Zig code on different platforms.

  • Using Zig with Travis CI - While less common than GitHub Actions, some legacy projects still use Travis CI. Zig's documentation includes pointers on setting up Travis CI for Zig builds.

  • Fuzz Testing in Zig - Official announcement detailing Zig's built-in support for fuzz testing introduced in Zig 0.14. It includes how to use the fuzz testing features and examples of detecting bugs in Zig applications.

  • Test Coverage for Zig Projects - A GitHub issue discussing ideas and strategies for implementing test coverage in Zig. Though Zig doesn’t have built-in support for test coverage yet, there are community-driven approaches and tools you can try.

  • Beautiful Commits and Code Formatting with zig fmt - Zig comes with a built-in formatter, zig fmt, to ensure consistent code style. You can integrate this into your CI setup to enforce formatting rules automatically.

  • Performance Testing in Zig - This project exists to track various benchmarks related to the Zig project regarding execution speed, memory usage, throughput, and other resource utilization statistics.

  • Zig Test Documentation - Zig’s documentation on writing and running tests. It provides an overview of Zig's testing features, including test declarations, assertions, and running tests as part of your CI pipeline.

Debug / Profiling

  • Zig Debugging with vscode - A gist about using vscode for debugging Zig programs.

  • Zig on Compiler Explorer - Like Rust's Compiler Explorer, Zig is also supported on Compiler Explorer. You can use this to explore Zig code as assembly and view the generated machine code. Simply select Zig as the compiler on the site.

  • Zig Performance Tracking - This project exists to track various benchmarks related to the Zig project regarding execution speed, memory usage, throughput, and other resource.

Are we ... yet?

  • Are We IDE Yet? - Zig - An overview of current IDE support for Zig. It lists plugins and extensions for popular editors like VSCode, Sublime Text, and Vim, tracking the maturity of the Zig developer experience.

  • Are We Game Yet? - Zig - It explores libraries, game engines, and Zig's capabilities for game-related projects.

  • Are We Async Yet? - Zig - Zig's official documentation on asynchronous programming. Zig is still developing its async features, but this section provides an in-depth look at the current state and future goals for asynchronous execution.

  • Awesome Zig - A comprehensive list of curated resources for Zig, covering libraries, tools, tutorials, and more. It's similar to "Not-Yet-Awesome Rust," helping developers find or contribute to Zig projects.

  • Zig GUI Libraries - Capy is a GUI library for Zig. It is mainly intended for creating applications using native controls from the operating system. It has been made with the goal to empower standalone UI applications, integration in games or any other rendering process is a non-goal.

Zig Comparison with Other Languages

Languages Links
C
C++
Go
Rust
Python
JavaScript
Java
Swift
Haskell
Ruby
Erlang
Nim

    Applications / Libraries / Tools

    See repos nrdmn/awesome-zig & zigcc/awesome-zig

    Notable Recent Projects

    • CascadeOS - General purpose operating system targeting standard desktops and laptops (115 stars)
    • dusty - HTTP client/server library for Zig (89 stars)
    • Ghostty - Fast, feature-rich, cross-platform terminal emulator with GPU acceleration and native UI. Built with Zig (52K stars)
    • Lightpanda - Zig-built headless browser optimized for AI automation and scraping (8.2K stars)
    • Regex.zig - Native Zig regex engine in the RE2 family with guaranteed linear time matching
    • wterm - Zig + WASM-powered browser-native terminal emulator by Vercel Labs
    • Zeno - High-performance embedded key-value storage engine with ART index (10M+ ops/sec)
    • zig-lsp-codegen - Building blocks to develop LSP implementations in Zig (147 stars)
    • zig-lz4 - LZ4 implementation in pure Zig
    • zig-regex - Modern, performant regular expression library
    • ziglint - Opinionated linting to keep your agent in check (35 stars)
    • zio - Async I/O framework for Zig with epoll/io-uring support (413 stars)
    • ziex - Full-stack web framework with HTML syntax within Zig code (163 stars)
    • zml - Any model. Any hardware. Zero compromise. ML framework built with Zig (2.6K stars)
    • zpdf - Zero-copy PDF text extraction library with SIMD acceleration (891 stars)
    • zwanzig - Static analyzer and linter for Zig (19 stars)

    AI / Machine Learning

    AI Agents & Frameworks

    • NullClaw - Full-stack AI agent framework in pure Zig. 678KB binary, ~1MB RAM, boots in 2ms. Supports 20+ LLM providers (2026)
    • KrillClaw - World's smallest AI agent runtime (49KB/450KB binary). Written in Zig, zero dependencies. Runs on microcontrollers or cloud. Supports 20+ LLM providers (2026)
    • zig-ai - Simple OpenAI API client for Zig with streaming support
    • zai - Multi-provider AI library for Zig (OpenAI-compatible, Amazon Bedrock, Anthropic)
    • ZigNet - MCP server for Zig with AI-powered code analysis, validation, and documentation (fine-tuned LLM)

    Deep Learning & Inference

    • zigrad - Deep learning framework with autograd engine. 2.5x+ speedup over PyTorch on Apple Silicon. Active development (192 stars)
    • zigTensor - Fast, flexible machine learning library in pure Zig (inspired by Flashlight)
    • zig-ml - Large Language Model inference written in Zig (llama2.c port)
    • llama2.zig - Inference Llama 2 in one file of pure Zig with SIMD optimization (211 stars, archived)

    Language stuff

    Closures

    Documentation

    Enums

    Errors

    Iterators

    Memory

    Comptime

    Strings

    Syntax Extensions

    Optional

    Playground

    Locale links

    Connection

    Are you searching for a Ziguanas ? Ziglang.org

    Do you want to ask a question? Zig Users Forum, Reddit

    Do you want to meet them IRL? Community

    Go to Ziguanas events? Zig SHOWTIME

    Are you looking for a job? Zig Jobs on Indeed

    Are you fast, simple, and focused? Find something Ziggy to work on!

    Do you want to stay up to date? The official blog, Zig NEWS, The official reddit

    Do you want to find out why some historical decisions took place? Zig GitHub Discussions

    Fearless Zig Bloggers

    Tutorials & Workshop Materials

    These are slides and materials from brick-and-mortar workshops about Zig. While they're unlikely to help a student learning independently, they may be of interest if you're running a workshop on Zig.

    About

    A bunch of links to blog posts, articles, videos, etc for learning Zig

    Topics

    Resources

    Code of conduct

    Contributing

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

     
     
     

    Contributors