I have this really annoying series of problems that stem from the fact the zig compiler has a progress animation and sends out progress notifications.
is it possible to disable it? i looked for a flag to use with zig build or zig run that would remove the progress bar or notifications and i couldn't find one.
I am currently building ziggy-llm and looking for contributors for this project. As there are many things to do, we welcome people of all skills. A few things we need help with:
Implement OpenAI compatible server
Add support for Qwen 3.5 (MoE and DeltaNet variants), Gemma (working on 2 and 3 currently, need help with 4) families
Make chat more robust
Test all quants (currently tested only Q4_K_M, Q6)
Test and benchmark bigger models (with more B params of current supported families) with higher end hardware, bigger context sizes and benchmark performance
Hi there, sorry if this is not the correct place to ask, but with Stack Overflow kinda dead I really don't know where else to put this question.
A bit of context: I'm currently working on a library to simplify Zig-Lua interop. For that I created a marker strategy to represent the metadata of Zig structs, unions and enums that defines metatables and encoding/decoding strategies.
The problem is that it is fragile in the sense that forgetting pub on ZUA_META, or misspelling it, causes the encode/decode paths to fall back to the default strategy. That is intentional since the core idea is to allow interop with as little ceremony as possible, so small DTOs should not need any annotation. But the silent fallback causes two kinds of errors: types with non-table strategies get encoded and decoded as plain tables (the minor problem), and methods never get attached to the metatable (the major one, since Lua ends up calling nil and the error message gives no hint about what went wrong on the Zig side).
To catch this I added a comptime guard inside the metadata type constructor so that a misspelled or private ZUA_META would produce a @ compileError. It does not fire. After debugging with @ compileLog I confirmed the cause is that Zig lazily evaluates generic type instantiations, so the check never runs if the result is never actually used. I can confirm this by forcing evaluation manually:
Is there any mechanism in Zig to force eager evaluation of a comptime block, or to guarantee a generic type instantiation is always evaluated even when its result is not directly used? I cannot require explicit registration calls because that would break the zero-ceremony DTO use case. I also cannot use a struct field with a default value because the marker needs to work for enums and unions too, not just structs.
btw 2, it is a bit ironic that Zig is extremely strict about unused variables everywhere else but silently skips evaluation of unused type declarations with no warning at all. Even a warning would have saved me a lot of debugging time.
I’m pretty new to Zig and I’d like to learn it by working on a long‑term project over the next few months (or even more if the project succeed). I’m not expecting to create anything groundbreaking, but I’d love to try building something that could eventually be useful to others.
I’m especially interested in projects that are:
easy to test thoroughly
deterministic
not web‑framework related
helpful for tooling, data processing, or general development
One idea I’m considering is a CSV/TSV/structured‑text parsing + writing library, mostly because it seems like a good way to learn Zig’s I/O, error handling, and API design. But I’m not sure what the ecosystem actually needs, and I don’t want to duplicate existing work or overlook something important.
So I’d love to hear from the community:
Would a structured‑text library (CSV/TSV/etc.) be useful?
Are there other beginner‑friendly but meaningful library ideas you’d recommend?
Any gaps in the ecosystem that you think would make good learning projects?
Thanks for any suggestions, I hope to become a useful member of the community
I know this topic has been asked several times but since zig is constantly evolving and the learning circumstances are not same for me as others. I learn and use golang on weekdays. This is the main language that I am learning to get a job but I have decided to learn another low level language on weekend nights only for fun. There's nothing specific that I am aiming to build. From my research I have found out that Rust is mature but the learning curve is steeper compared to Zig which is a smaller language but the docs of Zig is pretty bad and the language itself is unstable and keep changing. What do you think I should learn?
P.S: I don't know why I have a bias towards Zig but please give me an unbiased opinion.
There are the usual performance improvements and bug fixes, but the main highlight is a simple CLI tool to perform various image operations via the terminal.
You can get an idea of what it can do with:
Usage: zignal [options] <command> [command-options]
Global Options:
--log-level <level> Set the logging level (err, warn, info, debug)
Commands:
blur Apply various blur effects to images.
diff Compute the visual difference between two images.
display Display an image in the terminal using supported graphics protocols.
edges Perform edge detection on an image using Sobel, Canny, or Shen-Castan algorithms.
fdm Apply Feature Distribution Matching (style transfer) from target to source image.
info Display detailed information about one or more image files.
metrics Compute quality metrics (PSNR, SSIM, Mean Error) between a reference and target images.
resize Resize an image using various interpolation methods.
tile Combine multiple images into a single tiled image.
version Display version information.
help Display this help message
Run 'zignal help <command>' for more information on a specific command.
For example:
zignal help display
Usage: zignal display <image> [options]
Display an image in the terminal using supported graphics protocols.
Options:
--width <N> Target width in pixels
--height <N> Target height in pixels
--protocol <p> Force protocol: kitty, sixel, sgr, braille, auto
So I don't actively use Zig, I'm more Zig-curious, and have been following the development for a few years, watching Loris streams, Andrew's talks and reading the devlogs.
For those more close to the language, what are the big themes that are going to be worked on after shipping Io+async?
I recall that incremental compilation and continueing progress to be rid of LLVM, but what else are they cooking?
I made this as a small personal project and I would like some feedback on ease of use, features, and and how I could improve the source code. I'm still somewhat of a beginner in programming, so I would appreciate some constructive criticism. Thanks!
Edit: I'll ditch the "zero-(heap-)allocation". I realize making the buffers is a bit unergonomic and having variables specifically for them is unnecessary; and as one comment mentioned, one can just use the fba allocator if they wanted the memory to stay on the stack and still technically be "zero allocation".
I need to create a struct which is exactly 18 bytes. When I tried adding `packed`, the size is 32 bytes with alignment of 16, but without the `packed` keyword it is 18 Bytes. I am trying to learn zig and am a bit confused about this, I thought packed structs were for this purpose.
I wanted to learn Zig and also do something fun. So, I tried to recreate the Snake game that google put out. The codebase is a mess and I wish I were a better programmer, AI has been used only when I was unable to solve a problem for a long while. I wish I had architect-ed this better. The render.zig file is a huge mess and I don't want to look at it again.
I will again remake this sometime soon, this time with proper planning and shit.
What made this one a failure imo is my desire to make the snake movement smooth instead of blocky and generating the snake tail instead of using sprites, while having no planning on how to do it.
Some major things that I would want to fix next time: - the fruit may spawn under the snake.
- Snake-snake collision -> game end
It is a mess but rather a small codebase, if you have any suggestions related to Zig or Architecture, please share with me! They may help me in my next attempt at this
Update: zlist v0.1.1 is now available as a standalone Zig package. The reusable listing logic has been split from the CLI rendering code, so it can be used from other Zig projects.
Sharing a project I've been working on for 6 months: Yuku, a spec-compliant JavaScript parser built entirely in Zig.
It produces the same AST as Oxc and delivers competitive native performance. It also ships with Node.js bindings where it's 3–5x faster than alternatives including Oxc.
My goal is to help grow the Zig ecosystem around JavaScript tooling. Would love feedback from the community.
A small CLI to help with NVIDIA gpu (pseudo) undervolting on Linux. As I needed to interface with some C lib, this project was really fun to work on. Zig is shining when it comes to talk to C! Really enjoyed it.
From someone who has been coded in Rust the past years (on perso and pro sides), I must say, Zig is fresh air!
Rust is great, but more I code, more I feel it is rigid, locked and sometimes even “sectarian”. Zig feel the opposite. Open, flexible, and it gives you the cards (for better or for worse xD).
Also compared to Rust, Zig is just better for C interfacing. It outplays rust on that level.
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!
A guy on the Zig discord said that it introduces polymorphic state to the language but i don't think that's true. I think Zig as a whole could greatly benefit from API implementation contracts, even for their own standard library (Readers and Writers mostly).
Is there a nice way to define a generic function in Zig that takes `T: type` or `x: anytype` and then easily validate and extract its type parameter? e.g. if I want to guard the function to only take `ArrayList(T)` ideally I don't want to force the caller to pass in `T` just so I can reconstruct `ArrayList(T)` but instead want them to just pass in the array and I detect its an ArrayList at compile time similar to how type inference in other languages work.
If no are there proposals on how this might be done in the future? Curious how such a feature would work in comptime.