Zig NEWS

Cover image for Zig monthly, January 2022: Lua bindings, stage2 work, gamedev, and tons of new libraries
Stephen Gutekanst for Zig monthly

Posted on

Zig monthly, January 2022: Lua bindings, stage2 work, gamedev, and tons of new libraries

zoltan: a minimalist Lua binding

This month's showcase mention is @ranciere's zoltan project, a minimalist Lua binding. Use cases:

  • Dynamic configuration of the application (you can handle complex configuration cases which involve logic)
  • To support user-defined extensions
  • To automate repetitive user tasks (Neovim)
  • To develop UI business logic (a lot of games do this)

What struck me about their blog post was the simplicity of the API:

buztd: Super lightweight process killer

@vrmiguel released buztd, a super lightweight process killer for Linux.

ZT: ImGui+OpenGL+stb_image+GLFW

Runner up for this month's showcase mention, @JonSnowbd's project called ZT, "A zig-contained library for Windows and Ubuntu that automatically compiles and links ImGui, OpenGL, stb_image, and GLFW into typed packages." which has been in development for over 9 months:

minz: Minimal string compression

@judofyr released minz, a minimal string compressor based on the paper FSST: Fast Random Access String Compression.

Highly suggest checking out the Reddit discussion if this interests you.

Zig compiling and running a program faster than Python can interpret it

Andrew Kelley shared how the upcoming stage2 Zig compiler can compile an executable from scratch and run it faster than Python can interpret the file on the right:

We're also starting to get the first hints of how Zig's hot code swapping feature will work, with the first successful hot code swap shown on one of Andrew's recent Twitch streams!

Implementing the "Self" programming language in Zig

@sin-ack shared on Discord how they're working on an implementation of the Self programming language:

For about the past 2 months or so, I have been working on an implementation of the Self programming language (https://selflanguage.org/) in Zig. It's been coming along pretty well so far; the language parser, AST, interpreter and VM runtime is now done. For the past couple of weeks I have been working on getting garbage collection (generational scavenging GC) right and for the past couple of days I've been doing performance work. Feel free to ask me anything :^)

The project is available at: https://github.com/sin-ack/zigself

I've been recording some of the things I've worked on and uploading them here: https://www.youtube.com/channel/UC7XQtFrGLTuJpIMTg3oiZ5Q/videos (just published a second video, actually :^)

Visualizing how rasterization works on modern GPUs

@MichalZiulek is back again with more incredible DirectX graphics demos, this time showing how GPU reasterization of triangles works in slow motion ("This works by capturing render output to a transient buffer and then playing it back at human-discernable speed."):

Check it out on GitHub and consider sponsoring Michal's work!

zmath & introduction to zig-gamedev DirectX applications

The other two notable mentions from Michal are:

  • zmath 0.2: fast, multi-platform, SIMD math library ("This release brings matrix operations, quaternion operations and much improved API. I wrote short article about it here")
  • 6 zig-gamedev samples / intro applications, "Learn low-level graphics programming, game programming and zig-gamedev framework. Intro applications have been designed for learning purposes, I try to keep code as simple as possible and comment new functionality added in each subsequent program." - some very cool screenshots in here!

Minecraft-inspired arcade game

Ino#7587 is working on a Minecraft-inspired arcade game, built using their Zig SFML wrapper:

Zig Minecraft server implementation

@regenerativep is building a Minecraft server:

to feel my way around zig and networking and the minecraft protocol. not a lot of functionality, but the server can be joined and you can see other players move around https://github.com/regenerativep/zig-mc-server

Learning material

Major new library developments

Thanks for reading!

If you like my work on zigmonthly, Mach engine, etc. consider sponsoring me on GitHub so I can do even more of it!

Oldest comments (0)