# Zig build failed

**URL:** <https://forum.codecrafters.io/t/zig-build-failed/16349>\
**Category:** General\
**Tags:** challenge:http-server\
**Created:** [October 29, 2026, 11:38am UTC](https://forum.codecrafters.io/t/zig-build-failed/16349 "2026-10-29T11:38:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dillonko](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/dillonko/32/29401_2.png) [@dillonko](https://forum.codecrafters.io/u/dillonko)\
**Post date:** [October 29, 2026, 11:38am UTC](https://forum.codecrafters.io/t/zig-build-failed/16349/1 "2026-10-29T11:38:18Z")

</div>

Hi All,

I got the following error response. I looks like it’s failing because the build file can’t find the addPassthruArgs function or value. The only thing I can think if is that it is a version issue. I am using Zig version 0.16.0. the addPassthruArgs does not exist in the Run.zig file :

❯ ./your\_program.sh  
build.zig:31:12: error: no field or member function named ‘addPassthruArgs’ in ‘Build.Step.Run’  
run\_cmd.addPassthruArgs();  
~~~^~~~~~~~~~~~  
/usr/local/zig-x86\_64-linux-0.16.0/lib/std/Build/Step/Run.zig:1:1: note: struct declared here  
const Run = @This();  
^ ~~~~  
build.zig:31:12: note: method invocation only supports up to one level of implicit pointer dereferencing  
build.zig:31:12: note: use ‘.\*’ to dereference pointer  
referenced by:  
runBuild\_\_anon\_34192: /usr/local/zig-x86\_64-linux-0.16.0/lib/std/Build.zig:2264:33  
main: /usr/local/zig-x86\_64-linux-0.16.0/lib/compiler/build\_runner.zig:463:29  
5 reference(s) hidden; use ‘-freference-trace=7’ to see all references

Thanks in advance for any help!  
Dillon KO

---

<div class="post-metadata">

**Author:** ![dillonko](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/dillonko/32/29401_2.png) [@dillonko](https://forum.codecrafters.io/u/dillonko)\
**Post date:** [October 29, 2026, 1:02pm UTC](https://forum.codecrafters.io/t/zig-build-failed/16349/3 "2026-10-29T13:02:38Z")

</div>

OK I was able to look at the code on a few sites and I had to modify the build file in order to make it work. Since I am on Zig version 0.16.0 and this seems to on 0.17.0. The subtle diffrence was that function. I had to also add the import builtin so I could detect the version. This is the following change I added:

const builtin = @importimport(“builtin”); // added as line #2

I also added the following to replace line 33:  
if (comptime builtin.zig\_version.minor \>= 17) {  
run\_cmd.addPassthruArgs();  
} else {  
if (b.args) |args| run\_cmd.addArgs(args);  
}

This allowed for the app to run and then I got the follwing error. I think this part is expected and I need to add the needed code but just placing it here in case I am wrong:

❯ ./your\_program.sh  
Logs from your program will appear here!  
client connected!codecrafters-http-server-zig on  master [!] via ↯ v0.16.0 took 2m13s  
❯ codecrafters submit  
Submitting changes (commit: 8d6b269)…

⚡ This is a turbo test run

Running tests on your code. Logs should appear shortly…

Detected changes to build.zig. Re-building… (this might take a while)

[build] Starting build…  
[build] If you don’t see logs for 60s+, please contact us at hello@codecraft  
[build] Step 1 complete.  
[build] Step 2 complete.  
[build] Step 3 complete.  
[build] Step 4 complete.  
[build] Step 5 complete.  
[build] Step 6 complete.  
[build] Step 7 complete.  
[build] \> [auth] Started getting token authority from the client for registry-1.docker.i  
[build] \> [auth] Completed getting token authority from the client for registry-1.docker.i after 0.031s  
[build] Step 8 complete.  
[build] Step 9 complete.  
[build] Step 10 complete.  
[build] Step 11 complete.  
[build] Step 12 complete.  
[build] Step 13 complete.  
[build] Step 14 complete.  
[build] Step 15 complete.  
[build] Step 16 complete.  
[build] Step 17 complete.  
[build] Step 18 complete.  
[build] Step 19 complete.  
[build] Step 20 complete.  
[build] Step 21 complete.  
[build] Step 22 complete.  
[build] Step 23 complete.  
[build] Build successful.

[compile] Moved ./.codecrafters/run.sh → ./your\_program.sh  
[compile] Compilation successful.

[tester::#IA4] Running tests for Stage #IA4 (Respond with 200)  
[tester::#IA4] $ ./your\_program.sh  
[your\_program] Logs from your program will appear here!  
[tester::#IA4] $ curl -v [http://localhost:4221/](http://localhost:4221/)  
[your\_program] client connected!  
[tester::#IA4] Failed to read response:  
[tester::#IA4] Received: “” (no content received)  
[tester::#IA4] ^ error  
[tester::#IA4] Error: Expected: HTTP-version, Received: “”  
[tester::#IA4] Test failed

View our article on debugging test failures: [How do I debug test failures? - CodeCrafters](https://codecrafters.io/debug)

codecrafters-http-server-zig on  master via ↯ v0.16.0 took 2m30s

Best,

Dillon KO
