Skip Navigation
Zig Programming Language @lemm.ee cryptocode @lemm.ee
Zig Devlog - Parallel Self-Hosted Code Generation

"Less than a week ago, we finally turned on the x86_64 backend by default for Debug builds on Linux and macOS. Today, we’ve got a big performance improvement to it: we’ve parallelized the compiler pipeline even more!"

See the post for more details and benchmarks

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
conduit-z - A Zig library for efficient data streaming with automatic memory management and file system fallback
github.com GitHub - byterix-labs/conduit-z

Contribute to byterix-labs/conduit-z development by creating an account on GitHub.

GitHub - byterix-labs/conduit-z

From the README:

Overview

conduit-z provides a flexible Object type that can store and stream data efficiently, automatically switching between in-memory and file system storage based on size constraints. It's designed for scenarios where you need to handle data of varying sizes without knowing the final size upfront.

Features

  • Automatic Storage Management: Starts with in-memory storage and automatically falls back to temporary files when size limits are exceeded
  • Stream Interface: Provides both reader and writer interfaces compatible with Zig's standard I/O
  • MD5 Hashing: Built-in MD5 hash computation during read/write operations
  • Memory Efficient: Configurable memory limits and dynamic growth
0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
iledb: Disk Based Key-Value Store Inspired by Bitcask
github.com GitHub - rajivharlalka/filedb: Disk Based Key-Value Store Inspired by Bitcask

Disk Based Key-Value Store Inspired by Bitcask . Contribute to rajivharlalka/filedb development by creating an account on GitHub.

GitHub - rajivharlalka/filedb: Disk Based Key-Value Store Inspired by Bitcask

From the README:

FileDB is a Zig-implementation of Bitcask by Riak paper.

  • FileDB stores record metadata in a log-structured hashtable and parallely keeps 1 disk file open for inserting records in append-only mode. On restarts or MAX_FILE_REACHED, the disk file is rotated and all the oldfiles are kept open for reading only.
  • A compaction process running every config.compactionInterval seconds, reads all the disk files and combines them into one file while updating the metadata hashtable.
  • A sync process syncs the open disk files once every config.syncInterval. Sync also can be done on every request if config.alwaysFsync is True.

Read about internals in-depth at FileDb.

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
uuidz: An RFC compliant UUID library written in Zig.
github.com GitHub - tristanpemble/uuidz: A thread safe, RFC compliant UUID library written in Zig.

A thread safe, RFC compliant UUID library written in Zig. - tristanpemble/uuidz

GitHub - tristanpemble/uuidz: A thread safe, RFC compliant UUID library written in Zig.

From the README:

An RFC 9562 compliant UUID implementation for Zig.

About

  • Version support: Implements all UUID versions including the latest v6, v7, and v8
  • Type safety: Use the Uuid union to accept any version, or Uuid.V7 to only accept V7 UUIDs
  • Thread safety: Generate time-based UUIDs from multiple threads without coordination or duplicate values
  • Packed structs: All UUID types can cast directly to integers and work with raw bytes without overhead
  • Compliant: Generates UUIDs with correct bit layouts, version/variant fields, and timestamp formats
  • Non-compliant: Represent UUIDs that don't follow RFC 9562 for interoperability
  • Flexible clocks: Configurable clock sources for time-based UUIDs with atomic and local implementations
  • Zero dependencies: Uses only Zig's standard library

The design is heavily influenced by the Rust uuid crate, with some Zig specific flavoring.

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
tase: Multi-agent centralized logs control and management tool written in zig.
github.com GitHub - Gnyblast/tase: Multi-agent centralized logs control and management tool written in zig.

Multi-agent centralized logs control and management tool written in zig. - Gnyblast/tase

GitHub - Gnyblast/tase: Multi-agent centralized logs control and management tool written in zig.

From the README:

Tase is a lightweight log management system written in Zig. It consists of a daemon running on a master server and lightweight agents deployed across multiple servers. With a single config.yaml, Tase allows centralized control over log file management, including deletion, rotation, and truncation.

Features:

  1. Master-Agent Architecture: The master server manages configurations and schedules, while agents execute log management tasks.
  2. YAML-Based Configuration: The master server reads a config.yaml file to determine agent behavior and scheduling.
  3. Cron-based Scheduling: The application uses cron-based scheduling to execute the log management tasks at predefined intervals.
  4. Delete Logs: The application can delete log files that are older than a specified number of days or exceed a certain size.
  5. Rotate Logs: The application can rotate log files, optionally compressing the archived files using the GZip algorithm. It can also delete archived logs older than a specified number of days or size same as delete action.
  6. Truncate Logs (Not yet implemented): The application can truncate log files that are older than a specified number of days or exceed a certain size.
0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
dheap.zig: D-ary heap in Zig
github.com GitHub - tungli/dheap.zig: D-ary heap in Zig

D-ary heap in Zig. Contribute to tungli/dheap.zig development by creating an account on GitHub.

GitHub - tungli/dheap.zig: D-ary heap in Zig

From the READEM:

Heap with compile-time parameteric branching factor, also known as d-ary heap.

Note that there is a binary heap in the standard library if you do not want to use this module: std.PriorityQueue

Performance notes:

  • Heaps with higher branching factors are faster in inserting element and slower in removing elements. If you are going to insert and then remove all elements a binary heap is already quite fast and a branching factor higher than 5 is probably going to be less optimal. The optimal branching factor is usually around 4.
  • The branching factor here is compile time to enable the optimization of division by the compiler, see e.g: Montgomery modular multiplication.
  • If case you need to pop the top element and insert a new one, or vice versa, use the replaceTop member function to avoid paying the extra cost of "bubbling-up" the inserted element.
0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
lsr - fast "ls" tool written in Zig
tangled.sh @rockorager.dev/lsr

ls but with io_uring

This looks like a great demonstration of using io_uring to minimize syscall overhead

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
[library update] zg, a Unicode text processing library for Zig, now supports Zig version 0.14
codeberg.org zg

zg provides Unicode text processing for Zig projects.

zg

The release notes are here: https://codeberg.org/atman/zg/src/branch/v0.14-beta/NEWS.md

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
microwave: Spec compliant TOML parser for Zig.
github.com GitHub - edqx/microwave: TOML Parser for Zig.

TOML Parser for Zig. Contribute to edqx/microwave development by creating an account on GitHub.

GitHub - edqx/microwave: TOML Parser for Zig.

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

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
serpent: A sophisticated test runner for zig
github.com GitHub - tr1ckydev/serpent: 🐍 A sophisticated test runner for zig.

🐍 A sophisticated test runner for zig. Contribute to tr1ckydev/serpent development by creating an account on GitHub.

GitHub - tr1ckydev/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
0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
zeppelin - 2D graphics and window library in pure Zig
codeberg.org zeppelin

2D graphics and window library in pure Zig

zeppelin

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.

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
zigft: Zig function transform library
github.com GitHub - chung-leong/zigft: Zig function transform library

Zig function transform library. Contribute to chung-leong/zigft development by creating an account on GitHub.

GitHub - chung-leong/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:

``` 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}); } }; const func = attachDebugOutput(ns.hello, "hello"); func(123, 456); } ```

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
z2d: Pure Zig 2D graphics library
github.com GitHub - vancluever/z2d: Pure Zig 2D graphics library

Pure Zig 2D graphics library. Contribute to vancluever/z2d development by creating an account on GitHub.

GitHub - vancluever/z2d: Pure Zig 2D graphics library

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

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
zimdjson: Parsing gigabytes of JSON per second. Zig port of simdjson with fundamental features.
github.com GitHub - EzequielRamis/zimdjson: Parsing gigabytes of JSON per second. Zig port of simdjson with fundamental features.

Parsing gigabytes of JSON per second. Zig port of simdjson with fundamental features. - EzequielRamis/zimdjson

GitHub - EzequielRamis/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.
0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
[blog post] 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!

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
xit: a git alternative written in Zig
github.com GitHub - radarroark/xit: a git alternative written in zig

a git alternative written in zig. Contribute to radarroark/xit development by creating an account on GitHub.

GitHub - radarroark/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 even make them larger
    • read more about chunking
  • universal undo
    • any change to the repo can be cleanly undone
    • this feature is still under development, so it's not available yet
    • read more about the immutable database
  • clean implementation
    • uses no third-party libraries in production...all bugs are our bugs
    • can be easily used as a library in other projects
    • contains a reuseable git implementation in pure Zig
    • read more about xit's internals and using xit as a library
2
Zig Programming Language @lemm.ee cryptocode @lemm.ee
zball: A Breakout-clone written in Zig
github.com GitHub - chip2n/zball: A Breakout-clone written in Zig

A Breakout-clone written in Zig. Contribute to chip2n/zball development by creating an account on GitHub.

GitHub - chip2n/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

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
Tween: Common easing and interpolation functions for game development.
github.com GitHub - Games-by-Mason/Tween: Common easing and interpolation functions for game development.

Common easing and interpolation functions for game development. - Games-by-Mason/Tween

GitHub - Games-by-Mason/Tween: Common easing and interpolation functions for game development.

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

0
Zig Programming Language @lemm.ee cryptocode @lemm.ee
zq - Command line ZON parser/extractor similar to jq
codeberg.org zq

Command-line ZON processor.

zq

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

This tool helps parse that output

1
Zig Programming Language @lemm.ee cryptocode @lemm.ee
abelha: Parser combinator library for Zig.
github.com GitHub - yamada031016/abelha: Parser combinator library for Zig.

Parser combinator library for Zig. Contribute to yamada031016/abelha development by creating an account on GitHub.

GitHub - yamada031016/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.
0