C Zig

Open-source C projects categorized as Zig

Top 11 C Zig Projects

  • zig-gamedev

    Building game development ecosystem for @ziglang!

    Project mention: Goodbye to the C++ Implementation of Zig | news.ycombinator.com | 2022-12-08

    Language-level guarantees of memory safety are not critical to all low-level programmers, and sometimes this is fine!

    Developers of games, compilers, digital audio workstations, video editors, and live performance software (such as openFrameworks) likely don't rank memory safety as their top concern.

    Zig is already an attractive choice for those domains because it offers:

    - Great compile times compared to C++/Rust, and future plans to implement hot reloading as a core part of the tooling: https://www.jakubkonka.com/2022/03/16/hcs-zig.html

    - The ability to reason about where data exists in memory: https://ziglang.org/documentation/master/#Where-are-the-byte...

    - Good readability and learnability, especially if you have a C/C++ background.

    - Comptime that enables clean generics, compile-time reflection and general metaprogramming as a happy side-effect: https://kristoff.it/blog/what-is-zig-comptime/

    - Better tooling than C/C++. The ability to cross-compile Zig and C/C++ from one machine lets you set up much more stable and reproducible build environments already. You can clone zig-gamedev and have the demos working with just three commands on Windows/macOS/Linux, for example, and two of those three are cloning the repo and changing to the directory: https://github.com/michal-z/zig-gamedev (to build you will need the latest copy of Zig from the 'masters' section for your platform at https://ziglang.org/download/ )

    We should all be careful about insinuating that memory unsafe languages should not exist. I see “friends don't let friends use memory-unsafe languages” on social media and feel sick. It's much healthier to embrace the melting pot of Zig, Odin, D, Beef, Vale, Hare, Lobster, Jai, C3, Val, Roc and all the rest and see what new ideas and trade-offs they bring.

    Also worth noting that new languages tend to take time to develop their own philosophies to memory safety (Vale's approach is only just now emerging, for example: https://verdagon.dev/blog/making-regions-part-1-human-factor ). Zig's story might not be great now ( https://www.scattered-thoughts.net/writing/how-safe-is-zig/ ), but then it's not Zig's priorty at the moment, and Zig's full story is not yet written.

  • cowasm

    CoWasm: Collaborative WebAssembly for Servers and Browsers. Built using Zig. Supports Python with extension modules, including numpy.

    Project mention: active now: Commits · sagemathinc/cowasm | reddit.com/r/browserPOSIX | 2022-12-04
  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

  • tetris

    A simple tetris clone written in zig programming language. (by andrewrk)

    Project mention: How are compile times for 3k-20K LOC projects? | reddit.com/r/Zig | 2021-12-17

    Here's some early results of self-hosted on building Tetris:

  • zig-sqlite

    zig-sqlite is a small wrapper around sqlite's C API, making it easier to use with Zig.

    Project mention: Virtual tables with zig-sqlite | reddit.com/r/Zig | 2022-09-23

    One of my "zig" mulls has been how many future zig modules will eventually need to be pure zig - and how well does https://ziglearn.org/chapter-4/#translate-c work, which as your comments https://github.com/vrischmann/zig-sqlite/blob/master/tools/preprocess_files.zig indicate, it did NOT for this proj.

  • SDL.zig

    A shallow wrapper around SDL that provides object API and error handling

    Project mention: Is there a way to build Zig libraries to be used by Zig instead of as C libraries? | reddit.com/r/Zig | 2022-05-30
  • sokol-zig

    Zig bindings for the sokol headers (https://github.com/floooh/sokol)

    Project mention: Zig and WASM | news.ycombinator.com | 2022-07-13
  • zig-sdl

    self-contained SDL2 package for Zig

    Project mention: How to compile cmake projects with zig cc? | reddit.com/r/Zig | 2022-07-28
  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.

  • Hidamari

    Modern operating system aimed at running WebAssembly code. (by HidamariProject)

  • ziglua

    Zig bindings for the Lua C API

    Project mention: How's the current story with Zig in terms of dependancy management and build repeatability? | reddit.com/r/Zig | 2022-07-30

    Zig has a build system (the zig build command) that uses a build.zig file to compile a project. With a git submodule you just add the directory as a package in the build.zig file. Depending on the dependency, there might be a few more steps. For example, for my ziglua library requires adding the package path (so you can @import the zig sources), and also calling the link function which compiles the Lua C source and links with the Zig project.

  • fetch-them-macos-headers

    A utility for fetching minimal macOS libc headers

  • kc85.zig

    A KC85 emulator written in Zig

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-12-08.

C Zig related posts


What are some of the best open-source Zig projects in C? This list will help you:

Project Stars
1 zig-gamedev 1,205
2 cowasm 307
3 tetris 219
4 zig-sqlite 175
5 SDL.zig 151
6 sokol-zig 143
7 zig-sdl 59
8 Hidamari 59
9 ziglua 48
10 fetch-them-macos-headers 41
11 kc85.zig 32
Delete the most useless function ever: context switching.
Zigi monitors Jira and GitHub updates, pings you when PRs need approval and lets you take fast actions - all directly from Slack! Plus it reduces cycle time by up to 75%.