Non-Profits vs VC-backed Startups vs Private companies
Zig Software Foundation
we have achieved financial stability
we have released a useful working product
happy, talented, self-directed staff
ambitious roadmap
secure future
board or directors is the boss – when Andrew is gone, it will continue to operate
Zig in Action
Zig is general-purpose, which means it gives you the tools to generate the best possible machine code for the target, whether it is hardware or a virtual machine.
This makes it applicable to anything resembling a Vonn Neumann machine
But there are some cases where Zig truly excels thanks to its conservative language design choices.
Rive Window Manager
Bun – javascript runtime
Why is Bun fast? An enormous amount of time spent profiling, benchmarking and optimizing things. The answer is different for every part of Bun, but one general theme: Zig’s low-level control over memory and lack of hidden control flow makes it much simpler to write fast software. Sponsor the Zig Software Foundation.
Zigler - Elixer – use Zig in Elixer
VFX Plugins
Digital Audio Workstation
Mach game engine and graphics toolkit
Zig-Gamedev
TigerBeetle
Unmanned store in Sillerud
reports there were zero bugs
Zig Embedded Group
MicroZig – hardware abstraction layer
BoksOS
WASM-4 Games
Taste of Zig
ArrayList
a few orthogonal concepts that work together
users don’t spend much time fighting the language
Inline Loops
InlineLoops
AutoArrayHashMap
Zig uses generics, meta programming, and reflection a lot
unit tests automatically detect memory leaks
MultiArrayList
C Integration
example of cross compiling
builds all dependencies like SDL
Summary
Zig Software Foundation is a non-profit organization dedicated to improving the craft of software engineering as a whole.
Zig is a C/C++ compiler toolchain and build system that can be used to simplify maintenance of your existing projects.
Zig is a simple, powerful programming language that excels in the most demanding environments.
Python is basically a nice frontend to a lot of C libraries
Docker containers for every OS/Arch are commonly used in CI to build binaries
Python Wheels have eliminated a lot of the pain of native code in Python packages, but they are simply pre-built binaries – they still need to be build somewhere.
Zig proposed to cross-compile C code from one machine.
Zig packages all of the various libc and platform bits required to cross build on any platform (like Go).
Discussion of the problems of cross-compiling C code
The Python package index size is growing a lot due to all the binaries that are stored for every architecture and version (see graph below).
Zig build is declarative, but still creates a build graph.
There is no such thing as a clean operation for Zig build – no reason to clean your cache.
Zig cache is more than just timestamps: inode, hash of file, etc.
Zig gets rid of all your build dependencies – one dependency is both your compiler, build system, and package manager.
Loris Cro has written a static site generator in Zig. Uses the Zig build system to build the site.
I think we’re seeing the future here. Build systems (including cross-compilation) are moving to the language domain. This has already happened with Go and Rust – it looks like Zig is positioned to make this change for C.
A build system for C/C++ is an incredibly ambitious endeavor. I may try using Zig for my cgo build process. I was surprised that even 2 small C dependencies required a few hours of installing compilers and libraries along with debugging environment variable and the like… That’s just one OS / architecture combo.
The x86 backend is now passing 1884/1923 (98%) of the behavior test suite compared to the LLVM backend. Although it is not yet selected by default, it is more often than not a better choice than LLVM backend while developing, due to dramatically faster compilation speed, combined with better debugger support.
This backend is nearing completion; it is expected to be selected by default for debug mode early in the next release cycle. Users are encouraged to try it out in this 0.14.0 release. It can be selected with -fno-llvm, or use_llvm = false in a build script.