Zig Programming Language

168 readers
3 users here now

A lemm.ee community for Zig!

founded 1 year ago
MODERATORS
101
 
 

From the README:

This library helps to interact with NVIDIA GPUs from Zig.

Features:

  • Memory Allocation in GPU with defined size.
  • Copying data from host to gpu and viceversa.
  • Compiling (.cu) and loading kernels (.ptx) both from file and text.
  • Running kernels with grid/blocks/threads configuration.
102
 
 

An implementation of face-hh 's Bussin esoteric language written in Zig with a custom bytecode virtual machine and component-based mark and sweep garbage collector.

103
 
 

From the README:

*Zvisor is an open-source hypervisor written in the Zig programming language, which provides a modern and efficient approach to systems programming. Zvisor leverages the KVM (Kernel-based Virtual Machine) virtualization technology, which is built into the Linux kernel, to provide a lightweight and flexible virtualization solution.

One of the key benefits of Zvisor is its use of the Zig programming language. Zig provides a modern and efficient approach to systems programming, with features like memory safety, error handling, and compile-time optimization.

104
 
 

A benchmarking library for zig.

  • Uses built in monotonic, high performance timer.
  • Warms up to remove function call overhead time.
  • Supports lifecycle hooks like beforeAll, afterEach, etc.
  • Can export raw benchmark data to JSON.
  • Vibrant terminal output with easy to read data.
  • Highly customizable
105
 
 

Written in 2019, but re-announced with fixed today on Discord

https://fabioarnold.itch.io/snake

106
 
 

Lurk is a Vulkan or OpenGL overlay (similar to mangohud, or the steam overlay) that uses ImGui to draw into the render pipeline of 3D applications the participants in your current Discord voice/video chat. It can tell who is talking and when, and if they are deafened/muted. The code is still a mess at the moment in some parts, but that can be iterated on.

107
 
 

From the post:


Yes you heard that right, this game is written entirely in Typescript type annotations, which—if you didn’t know—are Turing complete.

So how the hell am I runnning it in the browser and rendering the game in Typescript types?

The basic rundown is that I created a type-level Typescript runtime, allowing Typescript types to be run outside of the Typescript compiler/language server.

This “runtime” is a custom VM implemented in Zig, which executes a custom bytecode format I compile Typescript code into.

108
 
 

A library that lets you parse TOML files into Zig structs

Currently targets Zig v.0.11.x

109
 
 

From the README:

3D Perlin Noise in Zig

This is a port of https://github.com/alterebro/perlin-noise-3d from JS into Zig which was adapted from P5.js https://github.com/processing/p5.js/blob/main/src/math/noise.js This Perlin noise's output should visually equivelant to p5.js but it has been optimized to be twice as fast

110
 
 

Proof of concept serialization library for zig, with built in versioning and backwards compatibility (can open previous version of serialized data), with support for custom upgrade functions, serializable inside a serializable struct and slices.

111
112
 
 

Early development of a new native psql driver written in Zig.

MPL-2.0 licensed.

113
5
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

From the README:

One neovim plugin for zig

now, supported features:

  • zls manager(install update uninstall) and automatic configuration
  • zig fmt
  • zig build
  • zig version
114
 
 

A fast json-rpc implementation in Zig based on simdjzon

Also includes a very competitive std-json-rpc implementation.

115
 
 

Features:

  • Simple config
  • Groups and Users allowed to use it
  • Timeout support
116
 
 

From the README:

ZTS is a minimalist Zig module that helps you use text templates in a way that is simple, maintainable, and efficient.

117
 
 

Nexus is an SDK for writing DOS applications/games based on Jay Petacat's dos.zig.

We've expanded on the original library to include:

  • Better FarPtr support/use
  • More and compatibility
  • A simple graphics API
  • Using DPMI VGA access
  • And a simple 320x200x256 mode (mode 13h) graphics API
118
 
 

From the README:

A simple version of Rust style type traits for Zig. Allows defining type traits and compile time verifying that types satisfy them.

It does not constrain that every declaration referenced on a type must belong to a trait that was implemented. Thus this trait library mainly serves as a convention that provides nice error messages and type documentation for comptime generics.

119
 
 

An HTTP framework loosly based on the Ruby Sinatra library.

120
 
 

Based on Neotest and uses Treesitter

This enables Zig tests to be executed from within Neovim

121
 
 

Command line wireguard configuration manager for complex VPN setups.

Written in Zig with a dependency on sqlite3.

122
 
 

A Zig port of Stream VByte encoding

StreamVByte is a new integer compression technique that applies SIMD instructions (vectorization) to Google's Group Varint approach. The net result is faster than other byte-oriented compression techniques.

123
 
 

zigTensor is a fast, flexible machine learning library written entirely in Zig; the design is heavily inspired by the Flashlight library.

Tracks Zig mainline.

Currently target macOS.

124
 
 

This presentation was recorded at GOTO Chicago 2023

ORIGINAL TALK TITLE How to Build Software From Source

PRESENTER Andrew Kelley

Download slides and read the full abstract here

125
 
 

sekao gives his thoughts about Zig after using it for a few months. Touches on memory management, C integration and comptime.

view more: ‹ prev next ›