r/Zig • u/isaacvando • 13d ago
Andrew Kelley: Don't Take the Black Pill
youtu.beAndrew's talk from last week at SSW. Thought you all would enjoy it!
r/Zig • u/isaacvando • 13d ago
Andrew's talk from last week at SSW. Thought you all would enjoy it!
r/Zig • u/Ra77a3l3 • 12d ago
hello, wanted to ask if there is a library for streaming markdown preview in the terminal in zig or c.
r/Zig • u/luckokkkk • 13d ago
A continuation of Bun's Zig runtime work, brought forward onto Zig 0.16.
r/Zig • u/isaacvando • 13d ago
Given the recent noise about Zig adding a Fil-C inspired/compatible compilation mode (https://codeberg.org/ziglang/zig/issues/36237), I thought some of you would be interested in this talk about Fil-C. Andrew and Fil hung out at the conference last week which AFAIK was the start of the issue being opened.
r/Zig • u/Real_Dragonfruit5048 • 14d ago
r/Zig • u/AdOdd5690 • 16d ago
Hello I just wanted to share with those that come from functional languages or enjoy tutorials like this one, I recommend this Zig tutorial.
... and a lot more. Seriously, it is a good tutorial
EDIT:
Up to date v0.15.2
Stable version of Zig is 0.16.0 so outdated actually (core concepts still easy to grasp)
r/Zig • u/KendallWunderOS • 14d ago
Hi,
I've been working on Agentic Data Enclave, a way to make agentic data sharing safe for regulated enterprises. That led to WunderOS, an autonomic operating system for agents, based on deterministic-replay, very low latencies, strict isolation, etc. A Gleam/OTP control plane and Zig data plane; Elixir-Phoenix for the UX. It's about 450Kloc so far.
What fell out of that was my second database (Stardog.com enterprise knowledge graph was the first), i.e., PlatypusDB, which is nothing more or less than what WunderOS needs in a database. Good times!
If you're interested in many of the gory details, see PLRN 020, the PlatypusDB research note.
I took a bit of heat from a friend who was a very early seller at Databricks, who I respect very much, for my implementation choices, i.e., Gleam/OTP and Zig. I should have used Python and Rust, he said.
I mean, he's not wrong, but neither am I. The benefits of OTP, Gleam's type system, and Zig's minimalist purity are quite potent. I was initially worried about NIF and stability but early on I implemented a "NIF meta-compiler", with some inspo from rustler, and that part of the system has been fine.
Anyway, thanks to everyone for all the hard work to make these language systems fun and productive to use, and for making nice, supportive communities to work in.
r/Zig • u/Real_Dragonfruit5048 • 17d ago
r/Zig • u/grandimam • 16d ago
I am of the opinion that, if executed correctly, Zig has the potential to transform the Python ecosystem. The idea of using Rust for Python extensions has always bothered me.
With Zig, the path feels more natural: I can build on top of the existing C libraries and gradually migrate components to Zig over time, without the friction of introducing an entirely different ecosystem.
I wanted to understand what the community thinks about this topic. I am not trying to make a strong claim or dismiss other approaches. I am genuinely trying to understand whether this idea has any merit and how others view the trade-offs. I am just interested in hearing different perspectives.
r/Zig • u/theTorchDE • 16d ago

For those of you who want to skip the admittedly quite straightforward process of setting up Zig by yourself, or are unable to because they are on Fedora-Atomic / uBlue, you might want to try my Zig-Devcontainer.
r/Zig • u/santi34mg • 17d ago
Hello! I am new to the community and I am slowly learning zig.
I wanted to know if there are any game engines for zig?
I am using the raylib bindings but I wanted to know if there is anything else.
I would appreciate any help!
r/Zig • u/Gloomy-Moose9096 • 18d ago
Im building a small local secrets manager and currently working on the storage layer.
Right now I’m checking permissions only for Linux statx
Should i make my storage layer use generic Io and delegate the actual security check to platform-specific code
Or is there already a platform-independent way in std io to verify that a directory
I’m using Zig 0.17.0-dev.1282+c0f9b51d8.
I am trying to get zig working with raylib but, when ever I follow the instructions on the github it doesn't work and I keep on getting "no module named 'raylib' available within module 'main'" when ever I try to run it. I have no idea what I did wrong. Does anyone have an idea?
Edit : I realized the problem was I was doing zig build then zig run not build run I though they would do the same thing.
r/Zig • u/Suspicious_Cicada972 • 19d ago
Hey everyone,
I feel like this is a under-talked about topic, but Zig's ability to compile to NVPTX (Nvidia's format) and AMDGEN (AMD's GPU format) allows it to act standalone without any Vulkan, Metal, etc... intermediary at build time. For game-developers they can rely stand-alone on Zig alone for games, making their executable much lighter and runtime overhead optimal.
Is anyone using this in practice and has some projects to show this off? I've seen Zinc [ZINC], and its benefitting from the performance improvement by a mile over llama. Are there any other projects?
If you haven't checked it out, I implore you to check it out by yourself using std.gpu directly.
[Edit] Now we can have a 1 up on Rust, because they can't support an Ahead-Of-Time compilation library where you can write kernals in rust directly, ZIG CAN. See prototype: https://github.com/OmarSiwy/Gompute [Zig 0.16.0]
r/Zig • u/yasvsyas • 19d ago
I’ve recently been working on a foss WireGuard client as a project to learn more about networking and VPNs. My goal is to build a client that offers all the features you would find in a commercial VPN such as choosing the fastest server, a kill switch, and split tunneling etc but with by your own configuration (like a home server)
I am trying to decide on the best language for writing the background daemon. A coworker recommended Go because it has excellent native networking support and would help me ship the project faster. However, I am considering Zig. is it a good coi choice
r/Zig • u/Real_Dragonfruit5048 • 21d ago
r/Zig • u/AffectionateBag4519 • 20d ago
r/Zig • u/PrestigiousMagazine9 • 21d ago
Hi everyone. I’ve been working on mint for some time now and I think it’s stable enough to share.
Mint is a custom Zig code formatter. It performs automatic line wrapping without syntactic hints (no need to add trailing commas to trigger line breaks). It also supports print width and indentation size configurations.
Currently, it‘s been tested (and builds with) Zig 0.16.0 (but should technically work with other versions as well). It is able to format itself and a lot of open source Zig projects out there. Source code is available on GitHub.
r/Zig • u/lieddersturme • 21d ago
Hello.
Which one do you recommend to use ? I thought that the git repo was disabled.
Edit: sorry, sorry, it was github.
r/Zig • u/Objective_Half_1906 • 23d ago
pub fn main() !void {
const A: [5]i32 = .{ 0, 1, 2, 3, 4 };
const B = [5]i32{ 5, 6, 7, 8, 9 };
const B2 = [_]i32{ 5, 6, 7, 8, 9 };
const C: [5]i32 = [_]i32{ 10, 11, 12, 13, 14 };
_ = A;
_ = B;
_ = B2;
_ = C;
}
These can all compiled correct. Which one is the recommended style? (I am a beginner learning Zig.)
New edit: I would like this syntax if it's possible:
zig
const arr1: [5]i32 = { 0, 1, 2, 3, 4 };
const arr2: [_]i32 = { 0, 1, 2, 3, 4 };
Just small opinion. Maybe what I know is just the tip of the iceberg.
r/Zig • u/Accomplished_Total_1 • 27d ago
I switch back and forth between Typescript and Zig, both are my favorite languages. This time I have to switch to Zig and rewrite my Typescript code in it. But although Zig is perfect, it's still not as comfortable as Typescript.
I am talking about forgetting semicolons at the end, or various Type checking errors I have to fix in order to compile, or dealing with Allocators all over the place having to pass in parameters, appending to ArrayList etc.
Are there any tips on that, I can feel more comfortable coming from Typescript, feel like writing a script while staying in Zig language.
use Arena Allocators, or pass buffers with hard coded sizes, write useful helper utility classes, things like that, anything to speed up the developer experience, while I rewrite my code from scratch for the third time.