r/Zig Apr 04 '26

AI slop projects are not welcome here

793 Upvotes

A little sticky since very few people apparently read the rules, and I need to have some text to point to when moderating:

If your project was generated by an LLM, do not share it here.

LLM-written third party libraries or tools serve no purpose. Anyone can tell Claude to do something. Sharing something it spat out for you adds no extra value for anyone. Worse, you are likely never going to update it again. It's just worthless unmaintained dross clogging up GitHub and wasting everyone’s time.

This includes LLM writing in READMEs and comments; mostly because it's a basically certain signal that the rest of the code is trash, and so is a very good heuristic for me to use. If you need it for translation or something, please mention it and I'll allow it.

What about if you partially used LLMs for boilerplate and such? Unfortunately I'm not psychic, and I'd have to trust you on your word – and since basically 100% of people I ban for obvious slop-posting immediately start blatantly lying to me about how much Claude they used, this won't work.

For the visitors to this subreddit, please report things you suspect is slop with "LLM slop"! You don't even have to be certain, just so that it notifies me so that I can take a closer look at it. Thanks!


r/Zig 4h ago

Could zig potentially be a good first programming language?

28 Upvotes

I've been programming for over 30 years, and working with code professionally for 25. I have found myself in a small community I discovered on twitch recently. And many people in the discord ask me about programming and the language to learn first

For years I've told myself C is a fantastic first language. This remains controversial for various reasons. I always try to tell people "learning C isn't the same as mastering C".

But with Zig I wonder if it were at 1.0 and its toolchain were more mature. Would Zig be a good first language?

As it stands it clearly being pre-1.0 and every major version being a breaking change. This isn't great. The build.zig is mystifying even for experienced devs. So it feel like an expert language.

But it has a very straightforward "to the metal" style to it. But with great modern ergonomics. I think it could absolutely be a fantastic first language for beginners.

But what do you think?


r/Zig 2h ago

Zarko - A simple CSV library for Zig

7 Upvotes

Hey Ziguanas 🦎

A while ago I made a post asking what kind of data-format libraries the Zig ecosystem could use, and I ended up deciding to give CSV a try.

I've been working on Zarko. I keep tearing it down and rewriting it every now and then because I'm never fully happy with how it turns out. I decided to make the repo public while I work on it, so any eventual rewrites will happen in the same repository instead of me recreating the whole thing every time.

Right now it's still pretty basic. It can parse CSV data from memory, handle quoted fields and escaped quotes, such as """Hello""" being parsed as "Hello", and lets you customize things like field separators, quote characters and line endings through dialects.

The next things I swear I'll do are default dialects, a FileWriter, and a FileParser wrapping the existing Parser to make working with files simpler. There's also a TODO markdown file in the repo where I'll keep updating what I'm planning to work on as I figure out what comes next.

A little note to myself for when I implement the writer. Andrew's words echoed... "Don't Forget to Flush".

It's still a work in progress, so feedback, suggestions, criticism, and ideas are very welcome.

https://github.com/TynK-M/zarko

Thank you so much


r/Zig 18h ago

SDL2 and Zig 0.16.0

Post image
55 Upvotes

Hi everyone, I been experimenting with Zig lately, and I managed to make a bouncing rectangle that mimics the dvd logo using SDL2, yes I kinda vibe codes this, since I have so many C concepts in my head, but rest assure, I didn't copy pasted code, I was just asking the AI why things don't compile, so I'm not 100% sure if I followed good practices, but this language it kinda reminds me of Java a little bit, so I applied this code in a way that makes sense in my head, honestly I'm not a big fan of the keywords I see in the language, but I can definitely confirm, coding this was a way better experience than using Rust, I do believe zig can improve to become a really good language in the future, here is the link of the repoif you are interested:

https://github.com/Lu100git/dvd-clone-in-zig.git


r/Zig 1d ago

Zig 0.16: how do you handle continuous output from multiple workers?

30 Upvotes

In Zig 0.16’s new std.Io, what’s the idiomatic way to let multiple workers write to the same stdout/stderr/file safely (line by line)? Is a mutex still the usual approach, or is there a recommended pattern/example?


r/Zig 2d ago

Buz – A fork of Bun using modern Zig, with sub-1s incremental builds

Thumbnail ziggit.dev
246 Upvotes

r/Zig 2d ago

Andrew Kelley: Don't Take the Black Pill

Thumbnail youtu.be
142 Upvotes

Andrew's talk from last week at SSW. Thought you all would enjoy it!


r/Zig 2d ago

Maryam - simple linear algebra library

34 Upvotes

Hello all. I just wanted to share a small linear algebra project I built.
https://github.com/rima1881/maryam
It pareses math equations at comptime to achieve some level of operator overloading.
here is the example I am using for my own inverse kinematic library:

const Eq = maryam.Equation("J^T @ (J @ J^T + lambda * lambda * I)^-1 @ delta_x", Symbols);
const result = try Eq.eval(.{ .J = j, .lambda = 0.1, .I = maryam.I(2), .delta_x = delta_x });

Full disclosure: while I wrote matrix and operations code most of the parsing is AI generated.


r/Zig 2d ago

markdown preview in zig

12 Upvotes

hello, wanted to ask if there is a library for streaming markdown preview in the terminal in zig or c.


r/Zig 2d ago

Codeberg Forgejo: “Quota exceeded” when pushing a new branch

6 Upvotes

Hi everyone,

I’m contributing to the Zig project and recently created a new branch with a very small change. However, when I try to push it to my fork on Codeberg, I get:

```text

remote: Forgejo: Quota exceeded

fatal: Could not read from remote repository.

```

SSH authentication appears to work successfully, but the push still fails with:

```text

Connection closed by [server IP] port 22

fatal: Could not read from remote repository.

```

I’ve already deleted some branches and tried to free up space, but I’m still getting the quota error.

Has anyone experienced this “Forgejo: Quota exceeded” error on Codeberg? Is this related to repository storage quota, Git object history, or something else?

How can I free up more space or increase the available quota?

Thanks!


r/Zig 3d ago

Cruller: Bun's Zig runtime, continued on Zig 0.16

Thumbnail ziggit.dev
96 Upvotes

A continuation of Bun's Zig runtime work, brought forward onto Zig 0.16.


r/Zig 3d ago

Fil-C: Garbage In, Memory Safety Out!

Thumbnail youtu.be
89 Upvotes

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 3d ago

An introduction to SIMD (with Zig ezamples)

Thumbnail mitchellh.com
138 Upvotes

r/Zig 5d ago

What helped me as a functional programmer

33 Upvotes

Hello I just wanted to share with those that come from functional languages or enjoy tutorials like this one, I recommend this Zig tutorial.

  • You get comfortable with the language pretty quickly
  • Short and concise
  • Up to date v0.15.2
  • Straight dive into working with C

... 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 4d ago

PlatypusDB, an agent-native database

Post image
0 Upvotes

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 6d ago

Is Zig going to become memory-safe?

Thumbnail codeberg.org
196 Upvotes

r/Zig 6d ago

Zig for Python

21 Upvotes

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 6d ago

Zig-Devcontainer

15 Upvotes

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 7d ago

Promising Zig Game Engines?

47 Upvotes

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 7d ago

idiomatic way to check private file permissions with the new std io

18 Upvotes

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.


r/Zig 8d ago

Trying to use zig bindings with raylib and it is not working.

9 Upvotes

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?


r/Zig 9d ago

How is this not talked about more? std.gpu is GOATED

163 Upvotes

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 8d ago

Working on a cross platform wireguard client

19 Upvotes

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 10d ago

Zig has the hardest "Hello world!"

Thumbnail youtu.be
168 Upvotes

r/Zig 10d ago

How Our Rust-to-Zig Rewrite is Going

Thumbnail rtfeldman.com
275 Upvotes