Zig

Open-source projects categorized as Zig

Top 23 Zig Open-Source Projects

  • bun

    Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

    Project mention: HTML Streaming and DOM Diffing Algorithm | dev.to | 2024-02-21

    And in the response use a ReadableStream. This would be the example with Bun:

  • zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

    Project mention: Show HN: Tokamak – A Dependency Injection-Centric Server-Side Framework for Zig | news.ycombinator.com | 2024-02-05

    Yes, fundamentally. In Rust if you take a parameter of generic type T without any bounds, you cannot call anything on it except for things which are defined for all types. If you specify bounds, only things required by the bounds can be called (+ the ones for all types). Another difference is where you get an error when you try pass something which doesn't adhere to a certain trait. In Rust you will get an error at the call site, not at the place of use (except if you don't specify any bounds).

    Zig is doing just fine without any trait mechanism and it simplifies the language a lot but it does come up from time to time. The usual solution is to just get type information via @typeInfo and error out if the type is something you're not expecting [0]. Not everybody is happy about it though [1] because, among other things, it makes it more difficult to discover what the required type actually is.

    [0] https://github.com/ziglang/zig/blob/b3aed4e2c8b4d48b8b12f606...

    [1] https://github.com/ziglang/zig/issues/17198

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • ziglings

    Learn the Zig programming language by fixing tiny broken programs.

    Project mention: Roadmap to master zig | /r/Zig | 2023-10-08

    Master syntax - language possibilities, so that you can read code. Ziglings (or github) does great job teaching it!

  • extism

    The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.

    Project mention: Show HN: Now my pet programming language can run in the browser | news.ycombinator.com | 2024-02-10

    It may just be my own unique obsession to peek at the internals of .wasm, but if anyone else is curious:

    https://modsurfer.dylibso.com/module?hash=ab6f4b2de9db171347...

    u/nbittich - curious if you've tried to use your language as as a scripting language inside other apps? I took a peak at your browser wasm environment, and think we could hook up the `compute` entrypoint you have here[0], but I'm not certain what the `ctx` does without going super deep, and if it could be passed into an Extism function[1] (which is how I'd try to run it from within 16+ other languages).

    [0]: https://github.com/nbittich/adana/blob/master/adana-script-w...

    [1]: https://github.com/extism/extism

  • river

    A dynamic tiling Wayland compositor (by riverwm)

    Project mention: Switching to River from Sway and a few questions | /r/riverwm | 2023-06-06

    More info on the wiki https://github.com/riverwm/river/wiki

  • mach

    zig game engine & graphics toolkit

    Project mention: Zig Software Foundation 2024 Financial Report and Fundraiser | news.ycombinator.com | 2024-01-18

    Myself and many others are betting on Zig in major ways, I truly think it has a bright future ahead.

    In spare time, myself and a few others are working on a game engine in Zig[0], and the Zig core team has been very receptive to addressing issues our project faces and supporting us.

    Others are working on pixel art editors[1], open source 2D RPG games[2], there's a group of independent folks working on a 3D massive immersive sim game[3], a group working on making Zig an amazing language for micro-controllers[4], etc.

    Please consider donating $5-10 a month to the ZSF! They are a great group of people, and it has so many knock-on effects for others in the FOSS community. :)

    [0] https://machengine.org/

    [1] https://github.com/foxnne/pixi

    [2] https://github.com/foxnne/aftersun

    [3] https://github.com/Srekel/tides-of-revival

    [4] https://github.com/ZigEmbeddedGroup

  • zls

    A Zig language server supporting Zig developers with features like autocomplete and goto definition

    Project mention: Have questions/requests/issues related to the Zig Language Server? | /r/Zig | 2023-05-06

    There is no official documentation but the standard library provides definitions for the exchange format and an incomplete set of function for exchanging messages in Client.zig and Server.zig. You can find examples of the zig compile server in action in my PR for ZLS and a showcase of hot-code-swapping by kubkon. The code that implements the ZCS in the zig codebase can be found here.

  • Onboard AI

    ChatGPT with full context of any GitHub repo. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at app.getonboardai.com.

  • zig-gamedev

    Main monorepo for @zig-gamedev libs and example applications

    Project mention: Zig for gamedev? | /r/Zig | 2023-04-15

    Two game frameworks in the making: https://github.com/michal-z/zig-gamedev & https://github.com/hexops/mach

  • zap

    blazingly fast backends in zig (by zigzap)

    Project mention: Zap – Fast backends in Zig | /r/patient_hackernews | 2023-06-14
  • capy

    💻Build one codebase and get native UI on Windows, Linux and Web

  • cargo-zigbuild

    Compile Cargo project with zig as linker

    Project mention: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux | news.ycombinator.com | 2024-02-17

    https://github.com/rust-cross/cargo-zigbuild

    I’m curious what the blockers are for rustc to cross-compile like zig does natively.

  • awesome-zig

  • wasm4

    Build retro games using WebAssembly for a fantasy console.

    Project mention: WASM Instructions | news.ycombinator.com | 2024-02-18

    Related:

    A fast Pascal (Delphi) WebAssembly interpreter:

    https://github.com/marat1961/wasm

    WASM-4:

    https://github.com/aduros/wasm4

    Curated list of awesome things regarding WebAssembly (wasm) ecosystem:

    https://github.com/mbasso/awesome-wasm

    Also, it would be nice if there was a WASM (soft) CPU for QEMU, which (if it existed!) would go here:

    https://github.com/qemu/qemu/tree/master/target

  • buzz

    👨‍🚀 buzz, A small/lightweight statically typed scripting language (by buzz-language)

    Project mention: Buzz: A lightweight statically typed scripting language | news.ycombinator.com | 2023-12-26

    FYI, for the interested, https://github.com/buzz-language/buzz/issues/209

    > You have to use the nightly build of zig.

    ie. `brew install zig && zig build` will not work.

  • libxev

    libxev is a cross-platform, high-performance event loop that provides abstractions for non-blocking IO, timers, events, and more and works on Linux (io_uring or epoll), macOS (kqueue), and Wasm + WASI. Available as both a Zig and C API.

    Project mention: Epoll: The API that powers the modern internet (2022) | news.ycombinator.com | 2024-01-11

    You might be interested in a pure Zig implementation of these primitives by Mitchell in his libxev library: https://github.com/mitchellh/libxev

  • awesome-zig

    📜Zig Learning Guide & Project Lists (by C-BJ)

  • arocc

    A C compiler written in Zig.

    Project mention: no more bit fiddling (and introducing bilge) | /r/rust | 2023-05-15

    Possible reference as it requires to use the compiler as part of language abi: https://github.com/Vexu/arocc/issues/178 Not sure, where a better thread with explanations of the flaws is.

  • zigmod

    📦 A package manager for the Zig programming language.

  • zig-clap

    Simple command line argument parsing library

    Project mention: After a day of programming in Zig | dev.to | 2024-01-01

    Zig and Rust both promote explicit error handling, however their mechanisms are different. Rust uses Result enums, while Zig uses a (global) error set type (though similar to an enum) and error propagation. Similarly, Rust uses the Option enum for optional types, while Zig uses a type modifier (?T). Both offer modern, syntactic sugar to handle those (call()? and if let Some(value) = optional {} in Rust, try call() and if (optional) |value| {} in Zig). Since Rust uses the standard library to implement error handling and options, users have the possibility to extend those systems which is quite powerful. However, I like the approach Zig takes in providing those things as language features. While their approach fits well into the C universe, I dislike that there is no pragmatic way to add more context to an error (but well, no allocations). Libraries like [clap](https://github.com/Hejsil/zig-clap) solve this by implementing a diagnostics mechanism.

  • microzig

    Unified abstraction layer and HAL for several microcontrollers

  • karmem

    Karmem is a fast binary serialization format, faster than Google Flatbuffers and optimized for TinyGo and WASM.

  • bog

    Small, strongly typed, embeddable language.

  • zig-cookbook

    Simple Zig programs that demonstrate good practices to accomplish common programming tasks.

    Project mention: Zig cookbook: collection of simple Zig programs that demonstrate good practices | news.ycombinator.com | 2024-01-01
  • WorkOS

    The modern API for authentication & user identity. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

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 2024-02-21.

Zig related posts

Index

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

Project Stars
1 bun 68,263
2 zig 28,714
3 ziglings 3,949
4 extism 3,477
5 river 2,792
6 mach 2,604
7 zls 2,183
8 zig-gamedev 1,879
9 zap 1,589
10 capy 1,229
11 cargo-zigbuild 1,078
12 awesome-zig 1,051
13 wasm4 1,030
14 buzz 1,017
15 libxev 892
16 awesome-zig 766
17 arocc 719
18 zigmod 673
19 zig-clap 657
20 microzig 634
21 karmem 630
22 bog 499
23 zig-cookbook 470
The modern API for authentication & user identity.
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com