Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)CR
Posts
48
Comments
0
Joined
2 yr. ago
Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zg, a Unicode text processing library for Zig, now supports Zig version 0.14

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

microwave: Spec compliant TOML parser for Zig.

This is a spec-compliant TOML parser for Zig. According to the README, the following parsers are available:

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

serpent: A sophisticated test runner for zig

From the README:

A sophisticated test runner for zig, with extra features and modern aesthetics.

  • Colored output logs
  • Supports hooks like @BeforeAll and @AfterAll
  • Bail tests early
  • Time record for each test
  • Pluggable into any existing project
  • Comes with expect(...).equals(...) type matchers
Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zeppelin - 2D graphics and window library in pure Zig

From the README:

Zeppelin is a cross-platform 2D graphics and window library in pure Zig*. It features hardware-accelerated vector graphics (through Vulkan), built-in text rendering, and a window system integration for windows and linux (wayland only). Android support is planned.

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zigft: Zig function transform library

From the README:

Zigft is a small library that lets you perform function transform in Zig. Consisting of just two files, it's designed to be used in source form. Simply download the file you need from this repo, place it in your src directory, and import it into your own code.

Here's one of the examples given:

 undefined
    
const std = @import("std");
const fn_transform = @import("./fn-transform.zig");

fn attachDebugOutput(comptime func: anytype, comptime name: []const u8) @TypeOf(func) {
    const FT = @TypeOf(func);
    const fn_info = @typeInfo(FT).@"fn";
    const ns = struct {
        inline fn call(args: std.meta.ArgsTuple(FT)) fn_info.return_type.? {
            std.debug.print("{s}: {any}\n", .{ name, args });
            return @call(.auto, func, args);
        }
    };
    return fn_transform.spreadArgs(ns.call, fn_info.calling_convention);
}

pub fn main() void {
    const ns = struct {
        fn hello(a: i32, b: i32) void {
            std.debug.print("sum = {d}\n", .{a + b});
  
Zig Programming Language @lemm.ee
cryptocode @lemm.ee

z2d: Pure Zig 2D graphics library

A 2D graphics library, written in pure Zig. CPU rendering.

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zimdjson: Parsing gigabytes of JSON per second. Zig port of simdjson with fundamental features.

This is the second of two simdjson ports for Zig, the other one being simdjzon

From the README:

Welcome to zimdjson: a high-performance JSON parser that takes advantage of SIMD vector instructions, based on the paper Parsing Gigabytes of JSON per Second.

The majority of the source code is based on the C++ implementation https://github.com/simdjson/simdjson with the addition of some fundamental features like:

  • Streaming support which can handle arbitrarily large documents with O(1) of memory usage.
  • An ergonomic, Serde-like deserialization interface thanks to Zig's compile-time reflection. See Reflection-based JSON.
  • More efficient memory usage.
Zig Programming Language @lemm.ee
cryptocode @lemm.ee

Comptime Zig ORM - an advanced Zig tutorial

matklad.github.io Comptime Zig ORM

This post can be considered an advanced Zig tutorial. I will be covering some of the more unique aspects of the language, but won't be explaining the easy part. If you haven't read the Zig Language Reference, you might start there. Additionally, we will also learn the foundational trick for implemen...

From the ingress:

This post can be considered an advanced Zig tutorial. I will be covering some of the more unique aspects of the language, but won’t be explaining the easy part. If you haven’t read the Zig Language Reference, you might start there. Additionally, we will also learn the foundational trick for implementing relational model.

You will learn a sizable chunk of Zig after this post, but this isn’t going to be an easy read, so prepare your favorite beverage and get comfy!

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

xit: a git alternative written in Zig

From the README:

You're looking at xit, a new version control system. Here be dragons, as they say. This is new and unstable software. Maybe one day it will be a worthy successor to git, but for now, only use it if you're adventurous. Here are the main features:

  • git compatible
    • supports the git networking protocol for push/fetch/clone
    • read more about git compatibility
  • combine snapshot-based and patch-based version control
    • merging and cherry-picking uses patches like Darcs and Pijul
    • restoring files and anything sent over the network uses snapshots like git
    • read more about snapshots vs patches
  • built-in TUI
    • all functionality will be exposed via the TUI
    • for now though, it only shows log and status...baby steps!
    • read more about the TUI
  • store large/binary files efficiently
    • uses a modern chunking algorithm (FastCDC) to deltify large files
    • doesn't compress binary files...it has no benefit and can
Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zball: A Breakout-clone written in Zig

From the README:

A Breakout-clone written in Zig.

You can play the web build here: https://arvidsson.io/project-zball.html

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

Tween: Common easing and interpolation functions for game development.

Tween is a lerp/tween library written in Zig by game developer Mason Remaley*___*

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zq - Command line ZON parser/extractor similar to jq

The Zig compiler is moving from json to zon for certain outputs

This tool helps parse that output

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

abelha: Parser combinator library for Zig.

From the README:

Abelha (Portuguese for "bee") is a high-performance, lightweight parser combinator library for Zig, inspired by Rust's nom. Designed for efficiency, composability, and ease of use, Abelha helps you build powerful parsers with minimal effort.

Features

  • Combinator-Based Parsing – Compose small parsers into complex ones seamlessly.
  • Extensible & Ergonomic – Define your own combinators for maximum flexibility.
Zig Programming Language @lemm.ee
cryptocode @lemm.ee

multi-bounded-array: Similar to std.MultiArrayList() but backed by fixed size arrays with a runtime length

From the README:

Similar to std.MultiArrayList() but backed by fixed size arrays with a shared runtime length.

Each field of T becomes an array with max length buffer_capacity. To access the arrays as slices use items(field) or constItems(field).

Useful when a struct of small arrays is desired with capacity that is known at compile time. Like std.BoundedArray, MultiBoundedArrays are only values and thus may be copied.

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

Roc to be rewritten in Zig

Roc's compiler is being rewritten in Zig primarily due to significantly faster compile times, which have been a major pain point in Rust.

Zig's allocator-based memory management, better tooling for static binaries, and built-in support for optimization techniques (like struct-of-arrays and bit-packing) align better with Roc’s needs.

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

From the README:

... a self-contained sample Zig codebase capable of building a Nintendo 64 ROM. Nothing shows up on the screen (yet), but it'll nonetheless run on real hardware (with debug output via USB on a SummerCart 64) or on low-level emulators like Ares (with debug output if the emulator supports ISViewer-based debug logging).

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zig-robotics/zigros: Zig build for the entirel rcl and rclcpp stack

From the README:

Welcome to ZigROS! ZigROS is an alternative build system for ROS2 utilizing the zig tool chain. ZigROS prioritizes static, single executable builds and edge deployments. Wrapping all the core C and C++ libraries, it greatly simplifies the ROS installation and deployment process by masquerading ROS2 as a single library. Simply include ZigROS as a dependency in your build.zig.zon and start building. No messing about with your package manager, ROS dep, or docker required.

ZigROS is suitable for building applications that depend on rcl or rclcpp. This includes interface generation for c and c++. Since the main goal of this project is static builds, python at runtime is out of scope. Python at build time is still required since ROS relies heavily on empy for the code generation. See the python section later on for more detail on how python is used.

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zlox: Zig implementation of Lox scripting language from Crafting Interpreters

From the README:

A (partial) implementation of the Lox scripting language from the book Crafting Interpreters, in Zig.

Enough of the compiler and vm are complete to run some interesting programs.

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

zig-minhook: The Minimalistic x86/x64 API Hooking Library for Windows

From the README:

This library is a wrap for original MinHook library. It's uses Zig build system to statically-compile source library and uses MinHook.h header file to wrap library functions.

Zig Programming Language @lemm.ee
cryptocode @lemm.ee

Zig Comptime is Bonkers Good

Great interactive blog post about the Zig comptime feature