zouyee/zig-learning
A bunch of links to blog posts, articles, videos, etc for learning Zig
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.
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
:star: Zig Programming Language Blurs the Line Between Compile-Time and Run-Time - Andrew Kelley
Compile-time Programming: A Beginner's Guide to comptime
in Zig - Guillaume Chérel
Custom String Formatting and JSON Serializing in Zig - Karl Seguin
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
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.