Zig Programming Language

241 readers
1 users here now

A lemm.ee community for Zig!

founded 2 years ago
MODERATORS
26
 
 

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.

27
 
 

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.

28
 
 

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.

29
 
 

Great interactive blog post about the Zig comptime feature

30
 
 

From the README:

Simple and fast general purpose work queue. The beauty of Beanstalkd is its absolute simplicity.

beanstalkz is a Zig client to beanstalkd

31
 
 

Ghostty, a terminal emulator written in Zig, just hit 1.0. Here's the HN discussion: https://news.ycombinator.com/item?id=42517447

32
 
 

From the README:

A high-performance bleeding edge Discord library in Zig, featuring full API coverage, sharding support, and fine-tuned parsing

Sharding Support: Ideal for large bots, enabling distributed load handling. 100% API Coverage & Fully Typed: Offers complete access to Discord's API with strict typing for reliable and safe code. High Performance: Faster than whichever library you can name (WIP) Flexible Payload Parsing: Supports payload parsing through both zlib and zstd*. Proper error handling

33
 
 

From the README:

Commy is a small utility used to connect and monitor serial, UART or COM port devices.

Commy runs on Mac, Linux and Windows. Windows support is experimental.

Does (some of) the same things as tio, minicom, screen, miniterm.py, zcom, PuTTY, etc.

34
 
 

FFI and C interop and how to do it safely from Zig

35
 
 

A minimal terminal Tetris written in Zig

36
 
 

From the README:

A collection of small modules implemented in the Zig programming language.

Modules

Each module has its own repo, for standalone use case, see the links below.

37
 
 

A linter for Zig with its own semantic analyzer

38
 
 

From the README:

A fully customizable, drop-in replacement for std.Options.LogFn with support for multiple file logging, buffering, colors (NO_COLOR supported), time and mutex!

39
 
 

An interesting blog post about using the Zig toolchain for Nintendo 3DS homebrewing.

40
 
 

An alternative to ZLS

41
 
 

From the README:

Cross-platform utility module for Zig to open native dialogs for the filesystem, message boxes, color-picking.

42
 
 

An Entity Component System API for Zig

43
 
 

From the README:

objective-zig is a work-in-progress Objective-C runtime and auto generated collection of Objective-C frameworks in zig. You can find the bindings generator at objective-zig-gen. These bindings are not ready. See the notice at the bottom of the README.

44
 
 

From the README:

This repository contains:

  • wire: a Zig module that defines types for Wayland's wire format and functions to serialize and deserialize messages.
  • shimizu-scanner: a command to take Wayland XML protocol descriptions and turn them into Zig types.
  • core: The Wayland core protocol as a Zig module, generated by shimizu-scanner
  • shimizu: A Zig module that provides higher level Connection and Proxy types.
45
 
 

From the README:

Cubyz is a 3D voxel sandbox game (inspired by Minecraft).

Cubyz has a bunch of interesting/unique features such as:

Level of Detail (→ This enables far view distances.) 3D Chunks (→ There is no height or depth limit.) Procedural Crafting (→ You can craft anything you want, and the game will figure out what kind of tool you tried to make.)


Written in Zig, of course

46
 
 

From the README:

A delightful, statically typed programming language for writing reliable software. veb features algebraic data types, pattern matching, generics, classes (without inheritance), traits, flow-sensitive typing with type narrowing, trait-driven operator overloading and modules. Ergonomic features such as pipe and concat operators are also supported. Currently, the language runtime executes on a custom register-based virtual machine written in Zig.

47
 
 

PEM/DER reader, written in Zig. Currently supports elliptic curve private and public keys.

48
 
 

From the README: A small Zig module, as a convenience for writing WebAssembly plugins for Typst

49
 
 

From the README:

HypergraphZ - A Hypergraph Implementation in Zig

GitHub Actions Workflow Status

HypergraphZ is a directed hypergraph implementation in Zig (https://en.wikipedia.org/wiki/Hypergraph):

  • Each hyperedge can contain zero, one (unary) or multiple vertices.
  • Each hyperedge can contain vertices directed to themselves one or more times.

Usage

Add hypergraphz as a dependency to your build.zig.zon:

zig fetch --save https://github.com/yamafaktory/hypergraphz/archive/<commit-hash>.tar.gz

Add hypergraphz as a dependency to your build.zig:

const hypergraphz = b.dependency("hypergraphz", .{
    .target = target,
    .optimize = optimize,
});
exe.root_module.addImport("hypergraphz", hypergraphz.module("hypergraphz"));

Documentation

The latest online documentation can be found here.

50
 
 

Zig•EM is a novel programming framework for resource-constrained embedded systems.

Read all about it in the linked blog post

view more: ‹ prev next ›