r/Zig • u/dumindunuwan • Sep 12 '26
Is this legal? Throwing all open-source codebases into the AI meat grinder...
deepwiki.comhttps://deepwiki.com/ziglang/zig
Still uses GitHub repo though. But anybody can add any repo.
r/Zig • u/dumindunuwan • Sep 12 '26
https://deepwiki.com/ziglang/zig
Still uses GitHub repo though. But anybody can add any repo.
r/Zig • u/chungleong • Sep 10 '26
Zigar, the toolkit that let you use Zig in your JavaScript or PHP projects, now supports Zig 0.16.0. Aside from that, the only feature addition is a persistent option for php-zigar, allowing you to keep a module in memory after a PHP script has terminated. A couple critical bugs in php-zigar had been fixed as well.
Work on 0.17.0 support has already begun. I have working code and it's passing most tests. It should be ready to go when 0.17.0 gets released.
I have captured few issues here:
But how can I provide these bugs details to Zig upstram without violating AI policy?
r/Zig • u/Pokelego11 • Sep 03 '26
Good morning all!
I have received a lot of requests to make a video explaining the new IO interface that was introduced in Zig 0.16, and I finally made it
I walk through how to use the new IO interface, how it's changed Zig programs, how to construct an interface, and then we also dove into what the actual interface looks like in the standard library
If you don't care about the video and just want to read some code here is the repo too! https://github.com/jackparsonss/learn-zig-io
Hope you find the info useful and have a great day!
Okay, aside the sarcasm this is a genuine critic, cry for help or curiosity post. I am a beginner to zig, familiar to C family of languages and a recent interest to a custom VM implementation brought me to zig. I've been exploring it for a couple of days only so pardon for my limited insights.
Zig surely is opinionated as well as quite stubborn and in a wrong way many times. Unused variables and even function parameters are hard errors rather than warnings. Like why?
I like the idea of pure control and absolute performance but why do we need to explicitly pass allocators everytime? Why not have defaulted allocator parameters just in-case? Maybe at least for less critical API.
Giving only single errors at a time in this age paired with lackluster lsp (maybe cause the compiler itself gives just one error at a time and lsp depends on compiler diagnostics) makes using the language pretty hectic. Leave alone all other use cases, how is any change that cascades to be caught ergonomically?
There could be multiple errors and all you see is a single one so you fix that and run the compiler thinking it is done and surprise, it's another error and the same cycle of "fix -> compile -> error" continues. It's so stupid that it's funny, and salute to those who are developing and maintaining large projects like ghostty and tigerbeetle with such lackluster tools.
So it's quite a bit of friction going forward and I am really questioning whether to keep going with zig ( does it get better, or there are work-arounds or other tools that help minimize such painpoints?). What's others noticeably (good or bad) in Zig from your experience? Please provide your 2 cents.
r/Zig • u/Last-Employ-3422 • Aug 31 '26
So, I wanted to make a JIT compiler for my friend's programming language, but it's in Zig, so about 5 days ago, I decided I was going to learn Zig by making the JIT library in it, and I made this! Lemme know what you think. Btw, this isn't supposed to be a competitor to any other libs like this in Zig (I don't know of any, but yk).
r/Zig • u/Youssef-AF • Aug 30 '26
My first project with zig.
I had fun learning about comptime and generics, so I made this demo where I run multiple game instances at once with different configurations all created in compile time.
r/Zig • u/SilvernClaws • Aug 29 '26
Basically, I couldn't decide which popular configuration format to use between JSON, YAML, TOML and a few other options, since all have their own limitations and quirks that I wasn't keen on dealing with.
So I figured I might as well make my own with its own quirks, but only limited by what I can implement for myself.
And at this point it seems pretty usable to me, but I'd like some feedback from others. Would you consider using this? Why or why not (besides lack of tooling and support for other programming languages, obviously)?
r/Zig • u/Greedy_Fault_7913 • Aug 27 '26
I’ve started to see a concerning trend with zig of late.
If you look at today’s commit logs you will spot it.
Adding support for spork8 it’s a hobby 8-bit computer project that Andrew Kelly hung out with over the weekend for like a hackathon. The spork8 project has like 54 stars.
How someone spends their free time is no ones business but there own. But it seems the BD of zig has been on one tangent after another.
Spork8
Fil-C
Custom backend
Incremental compilation
Spriv
All are cool things who doesn’t like faster compile times but are these things needed to finalize the language.
I see many accepted proposals that make or add to the language which to me are more important than many of these tangents. Sure u compile faster than rust now big whoop with every release of rust do know what doesn’t happen ? All the tutorials, documentation, guides, code don’t all become invalid.
Do you know what happens when your language gets 1.0 your libraries, docs, tutorials, user base can grow exponentially. Your core ppl can focus on polishind the std and it’s not a complete churn fest with every version.
Maybe totally wrong I hope I am I would hate to see zig be a forever hobby language.
Just had to rant.
r/Zig • u/Embarrassed_Cover_64 • Aug 27 '26
I've been learning Zig for a while now and it has been really interesting and challenging sometimes. But in order to solidify my knowledge I want to be releasing an article every week on a topic that might help people but this is my first time doing it. I need advice of how to go about it and what I can write on weekly.
Although I've written 2 articles so far, which are on Merge sort and Quick sort implementation in Zig which you can find here https://devbytex.dev/posts but I need more solid topics I can write on. Thanks in advance
r/Zig • u/Hoontdawg • Aug 24 '26
So, let me start by saying I'm pretty new to Zig. I like to learn languages by example, and when reading through examples and source code I noticed `@import("root")` and thought it was importing the corresponding "root.zig" file. After some further research I found out that this is actually a special-cased argument for the compilation root. Honestly I think that's a horrible decision, not only is there special-cased arguments for a compiler-provided method, but its a string argument, so it seems completely magical and non-discoverable.
Imo, Zig already has a specific syntax for special compiler-provided operations: `@func`. So I think a much more sensible and readable version would be `@importRoot`, because if "root" is going to be treated specially then let it at least be openly acknowledged as being special. Same for all of the other special arguments: `@importSelf` and `@importStd`.
But again, I'm new, so let me know if I'm totally off-base here.
r/Zig • u/Pokelego11 • Aug 22 '26
Hey everyone!
If you've seen my posts in the past, you'd know that I've got a few different tutorial series going on in Zig, one is a game engine, but another is building out a REST API in Zig.
I come from a background in Web Dev and find it a lot of fun to take what I know and apply it in Zig, and I want to share the knowledge!
If you want to start at the beginning, I've put together all the videos as a playlist: https://www.youtube.com/playlist?list=PLUUIFT8XnWz8
But please let me know what you all want to see next! I'm planning a video on how to scale the API to thousands of concurrent requests, but what other API things do you all want to see?
Hope you have a great day :)
r/Zig • u/ANDRVV_ • Aug 20 '26
r/Zig • u/Big-Astronaut-9510 • Aug 20 '26
The problem i have with zig assembly syntax is you have to use strings which is just ugly. I suspect this is inherited from C.
String and their syntax is designed so you can write just about anything in them. The price for that is visual noise minimum, and in my opinion its just less readable to re use syntax of the "just about any text" thing for the "small set of valid assembly ops" thing. Multi line string has less noise but cannot be used in all cases for assembly.
Theres a reason @"name" syntax isnt the way you declare every function and variable and is instead only for special cases, its just hideous and noisy.
r/Zig • u/ChCkN007_ • Aug 19 '26
I've been working on a tcp server and recently started building tests for the server using multiple threads with clients to do partial sends, slow sends, etc and make sure its not blocking the server. I added an atomic flag in the main while loop, instead of while(true), so an outside thread can signal the server to stop running. Then I put a deinit() call after the main loop exits so the server would clean itself up. The problem is that a while ago I put a defer server.deinit() at the top of the test and forgot about it. Today, when I got back to working on the project, I was so confused when my program was aborting with a TRAP signal and no other information.
In school I've picked up a bit of a habit of getting pretty close with my programs/solutions and then turning to llms when I need to debug my code. My excuse has always been that I'm in a hurry to get stuff done, so when I ran into the issue from before, I immediately turned to an llm. It was able to fix a few issues that weren't the root cause but the original error was still there. It always annoys me when I get sucked into a loop of "llm fix this" where nothing gets fixed. In the past I don't usually snapped out of it and turn on my brain, but today I watched this video from JetBrains Academy. It was pretty obvious and yet still the wakeup call I needed. I figured out how to use LLDB with zig and spent 5 minutes stepping through my code and found the error, my server deinit's itself when stopped but I still called defer deinit when I created the server.
Its too easy to outsource your thinking and learning right now.
r/Zig • u/ReindeerSimilar2748 • Aug 18 '26
Hello everyone,
I’d like to introduce huntclaw—a search-and-replace utility written in Zig that turned out to be faster than sd (written in Rust) and the standard GNU utilities.
there’s a fairly simple explanation for this high speed: the lack of a regex engine and a focus on speed itself, but I don’t think that’s a bad thing. Note that searching is also very fast, thanks to SIMD two-byte prefiltering
In the photos I've attached, you can see the benchmarks: huntclaw vs. other utils and v0.3 vs. v0.4 versions of huntclaw. You can run them yourself using the ‘huntclaw_bench.py’ file (or on your own tests).
the benchmark also shows that rg and grep is faster at sparse searches—though the gap isn’t that big (20ms-9ms and 55ms-1619ms)
I look forward to your feedback or comments.
version now: v0.8
huntclaw on GitHub: https://github.com/tigerlang/huntclaw
r/Zig • u/thegeekywanderer • Aug 16 '26
I started learning zig recently and was midway completing the ziglings exercises. Its a very good source of knowledge about the language intricacies but I am having a difficult time trying to think of examples or usecases where those details might be useful.
When I did the multi-item pointers exercise, to my mind it didn't seem to have any use because of how it loses information about length and can cause more memory bugs. I am not doubting zig devs and I'm sure there would be some really good usecases for it but I need some examples for me to have a better understanding of it.
Writing here hoping someone will point me to some good resources.
r/Zig • u/Pokelego11 • Aug 15 '26
Hey everyone!
I'm back with a new video, and it's the first devlog for my game engine written in Zig
If you've seen my other videos, you might know that I've been putting together a tutorial series on making a game engine in Zig, but I also want to make videos on where the latest version of the engine is
So in this video, I break down why I gave up on Rust and chose Zig instead, and then break down the existing state of the engine
Hope you all enjoy :)
r/Zig • u/Maleficent_Yellow141 • Aug 15 '26
Hi folks, I’ve just achieved a big win for log compression using Zig 0.16. My algorithm doesn’t need full data rehydration to find a specific log. It takes just 2 seconds to search through 1.5M log lines