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.
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 here and here.
- ⭐ Something made by repo owner member.
- 🔚 Concepts are still useful but code could not compile.
- 🔜 Work In Progress.
- Books
- Videos
- Podcasts
- Zig in practice
- Best Practices/Style Guides
- Cheat sheets
- Zig internals
- Compilation
- FFI
- CI / Testing
- Debug / Profiling
- Are we ... yet?
- Comparison with Other Languages
- Applications / Libraries / Tools
- Language stuff
- Playground
- Locale links
- People
- Tutorials & Workshop Materials
- ⭐ Learning Zig - Introduction to Zig aimed at developers coming from garbage collected languages.
- ⭐ Zig Programming Language - An introductory book on Zig, covering the basics to advanced topics.
- ⭐ Zig by Example - A hands-on guide with examples to learn Zig.
- ⭐ zig-cookbook - Simple Zig programs that demonstrate good practices to accomplish common programming tasks.
- ⭐ Introduction to Zig - A video introduction to Zig and its features.
- ⭐ Zig ShowTime - A playlist of talks and tutorials on Zig by community members.
- ⭐ Zig Roadmap 2024(Andrew Kelley)
- ⭐Is 2024 The Year Of Zig ?
- Advent of Code 2023 in Zig
- 2023-10-04 - Rust & Zig Combined • Richard Feldman • GOTO 2023 - Richard Feldman
- 2022-10-04 - Intro to the Zig Programming Language • Andrew Kelley • GOTO 2022- Andrew Kelley
- 2019-04-23 - Andrew Kelley - The Zen of Zig - A presentation by the creator of Zig, explaining its philosophy and features.
- 2024-09-30 - Pragma driven shared memory parallelism in Zig by supporting OpenMP loop directives - In this paper they describe enhancing the Zig compiler to add support for OpenMP loop directives.
- 2024-07-14 - Zig as a Multi-OS Build System (with Loris Cro) - [ Loris Cro][]
- 2022-07-01 - Full-Time Open Source With Andrew Kelley
- 2022-06-24 - Zig with Andrew Kelley
- 2022-01-24 - Zig and Zigler with Isaac Yonemoto - [Isaac Yonemoto][]
- ⭐ Zig By Example
- Why your first FizzBuzz implementation may not work
- ⭐ Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one - [Brian Anderson][]
- ⭐ Building an HTTP client/server from scratch - A practical guide to building a web server in Zig.
- Writing a struct deserializer with Zig metaprogramming
- ⭐ Zig Design Patterns
- ⭐ zig-common-tasks - renatoathaydes
- ⭐ Zig API guidelines
- Reading Zig Function Signatures - [Val][]
- Good Practices for consuming C libraries - cztomsik
- Zig Bits
- Best Practices for Structuring Zig Projects with External Dependencies - [castholm][]
- Comparing Rust vs. Zig: Performance, safety, and more - [Eze][]
- Memory Safety in C++ vs Rust vs Zig
- A TypeScripter's Take on Zig (Advent of Code 2023)
- ⭐ Syntax Index - Official documentation covering Zig's syntax and key concepts.
- Zig Learn - A community-maintained guide for beginners, offering an introduction to Zig's core features with practical examples.
- Zig by Example - A collection of simple and concise Zig code examples for learning and reference.
- Zig Standard Library Overview - A detailed overview of Zig’s standard library, ideal for understanding built-in utilities and functions.
- 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 Playground - An online environment for experimenting with Zig code snippets and testing ideas quickly.
- Community Zig Tutorials - A portal for discovering new Zig tutorials and community-driven content.
- Zig Memory Management Guide - Useful tips and tricks for managing memory safely and efficiently in Zig.
- ⭐ Zig Proposals - A collection of Zig’s proposed RFCs (Request for Comments) for proposals.
- ⭐ Zig Documentation - The official and comprehensive documentation for understanding Zig’s features and syntax.
- ⭐ Zig Community Forum - A discussion platform for Zig language design, development news, and technical questions.
-
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.
-
Zig: Cross-compiling for Systems - A blog post that explores how Zig can be used for multi-systems, Cross-compilation is especially great when you need to release an application that runs on multiple platforms: with Zig you can create all release artifacts from a single machine.
-
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.
-
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.
-
Building and Linking C Libraries with Zig - This ZigLearn chapter shows how to use and link C libraries with Zig, which is helpful when creating bindings or using external C code in a Zig project.
-
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.
-
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.
-
Code Coverage for Zig - Despite the Zig compiler not having built-in support for generating code coverage information, it is still possible to generate it (on Linux at least). There might be other possibilities.
-
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.
See repos nrdmn/awesome-zig & zigcc/awesome-zig
- ⭐Closure Pattern in Zig - Andrew Houghton
- Implementing Closures and Monads in Zig- Andrew Brent Gossage
- Zig Anonymous Functions and Closures: An In-Depth Analysis
- ⭐ Writing Documentation for Zig Projects - Zig Community
- Generating documentation from zig build - sudw1n
- Using Zig's Built-in Documentation Generator - docgen
- ⭐ The Power of Zig Enums - ziglang.org
- Extending an Enum in Zig - Fredrik Kihlander
- ⭐ Ziglang Document:Errors ziglang.org
- Error Handling in Zig - zig.guide
- Support error sets in switch cases - hryx
- Return Values and Error Unions in Zig - gencmurat
- Error Handling In Zig - karlseguin
- Errors and Zig - Phil Eaton
- ⭐proposal: Streamline loops, and enhance iteration - Tetralux
- ⭐Proposal: Generator / Iterator Syntactic Sugar - kayomn
- How Zig Handles Iteration - zig.guide
- Zig's Curious Multi-Sequence For Loops - Loris Cro
- Learning interfaces by implementing iterator in zig - Akhil
- ⭐ Memory Management in Zig: A Lifetime-Free Approach - Andrew Kelley
- ⭐Memory Management in Zig - ziglang documentation
- Memory Management With Zig - Nathan
- How (memory) safe is zig? - Jamie Brandon
- Learning Zig - Heap Memory & Allocators - Karl Seguin
- What's a Memory Allocator Anyway? - Benjamin Feng
-
⭐ Zig Programming Language Blurs the Line Between Compile-Time and Run-Time - Andrew Kelley
-
⭐ Conditionally Disabling Code with Comptime in Zig - Mitchell Hashimoto
-
⭐ Tagged Union Subsets with Comptime in Zig - Mitchell Hashimoto
-
Compile-time Programming: A Beginner's Guide to
comptime
in Zig - Guillaume Chérel -
Custom String Formatting and JSON Serializing in Zig - Karl Seguin
- Proposal: Add String to the type system - mlarouche
- Unicode String Operations - dude_the_builder
- Using Zig to Call C Code: Strings - Michael Lynch
- How to use hash map contexts to save memory when doing a string table - Andrew Kelley
- Zig / Strings in 5 minutes - Huy
- Pointers in Zig - Nathan
- Zig Metaprogramming - ikrima
- Supercharging Python Performance with Zig: Building Python Packages and Benchmarking for Speed - Bassem Aziz
- What's up with Zig's Optionals? - Reddit
- Proposal: Optional argument names in function calls
- Ziglang Document:Optionals
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, Zig conferences and events
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
- Andrew Kelley - blog
- Jonathan Marler - blog
- Hejsil - blog
- Hexops - blog
- Karl Seguin - blog
- Loris Cro - blog
- tigerbeetle - blog
- Validark - blog
- Mitchell Hashimoto - blog
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.
- Loris Cro's Ziglings, a series of small exercises introducing Zig syntax and concepts interactively.
- Zig SHOWTIME Videos featuring tutorials and real-world examples from the Zig community.
- sleibrock' Zig and WebAssembly Tutorial covering Zig's use in modern WebAssembly projects.
- Zig Advent Calendar offering a curated set of beginner to advanced Zig tutorials and exercises.
- orhun's Zig Bits focusing on practical library implementation in Zig.
- A half-hour to learn Zig this is inspired by a-half-hour-to-learn-rust
- A Unix Shell in Zig exploration combining Zig with scripting tools.