# Discussion of zig build and lower level direct invocations

**URL:** <https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788>\
**Category:** Brainstorming\
**Tags:** build-system\
**Created:** [May 28, 2026, 8:00pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788 "2026-05-28T20:00:06Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![mwr](https://ziggit.dev/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mwr](https://ziggit.dev/u/mwr)\
**Post date:** [May 29, 2026, 8:24pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/21 "2026-05-29T20:24:27Z")

</div>

> [@Sze](#):
>
> I find your way of arguing unfair.

It seems to me that there is another misunderstanding: to make complex things simple, they need to be discussed in detail. That’s what I’m trying to do.

---

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [May 29, 2026, 8:46pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/22 "2026-05-29T20:46:00Z")

</div>

To me it comes more across like someone new to the language making claims they haven’t researched in detail and then wanting people to argue with them.

There are plenty of topics on this forum explaining the details of various parts of the build system, I want you to read those first and then you can point out things that were still left unexplained, but I don’t want to re-hash things that have already been explained in other topics.

Here are some links to help you get started reading:

- [I want to create a complex lib - #5 by castholm](https://ziggit.dev/t/i-want-to-create-a-complex-lib/3146/5)
- [Best Practices for Structuring Zig Projects with External Dependencies](https://ziggit.dev/t/best-practices-for-structuring-zig-projects-with-external-dependencies/3723)
- [Zig ways of the code reusing](https://ziggit.dev/t/zig-ways-of-the-code-reusing/10452)
- [Build System Tricks](https://ziggit.dev/t/build-system-tricks/3531)

So please read some existing topics and make notes about things that don’t make sense to you and then you can link to the things you have read and found lacking in detail, describe which parts didn’t make sense to you and then we will be happy to dig into those details with you.

I think if you do this, it could be hugely valuable, because getting a fresh perspective on things is very useful, but if we have to re-hash too much it becomes an exchange that isn’t balanced and enjoyable for everyone involved.

Otherwise it seems unproductive to me to re-examine a big topic like the build system from scratch again, when there already are a lot of topics about this.

---

<div class="post-metadata">

**Author:** ![mwr](https://ziggit.dev/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mwr](https://ziggit.dev/u/mwr)\
**Post date:** [May 29, 2026, 9:20pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/23 "2026-05-29T21:20:23Z")

</div>

@Sze

I think Robbie and I had a normal discussion, and Robbie had no complaints about me. If that’s not the case, let Robbie say otherwise.  
We discussed very specific things, and I gave a specific example and a specific scheme for solving the problem. And I thought Robbie wouldn’t mind discussing it further.  
And I am 99% sure that in the vector in which we are discussing this, no one has discussed it yet.

> [@Sze](#):
>
> new to the language

Based on my impressions from conversations, there is an opinion that very few people understand the build system as a complete architecture. And this means that people accept this as a dogma and don’t even try to understand the internal problems of the build system.  
It seems to me that the language is at that stage of development in order to adequately address reasoned critical discussions. After all, open discussions can give rise to new views on old problems.

---

<div class="post-metadata">

**Author:** ![Chaz](https://ziggit.dev/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@Chaz](https://ziggit.dev/u/Chaz)\
**Post date:** [May 29, 2026, 9:29pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/24 "2026-05-29T21:29:23Z")

</div>

> [@mwr](#):
>
> Here is an example project consisting of the following parts:  
> `/somepath1/proj/`  
> `/somepath1/proj/main.zig`  
> `/somepath2/vendor1/dep1/`  
> `/somepath2/vendor1/dep1/dep1.zig`  
> `/somepath2/vendor2/dep2/`  
> `/somepath2/vendor2/dep2/src/dep2.zig`  
> `/somepath3/build.zig`  
> `/somepath4/build.zig.zon`

I’d expect something more like:

```zig
/build.zig
/build.zig.zon
/proj1/
/proj1/main.zig

zig fetch --save https://dep1+version-branch-tag
zig fetch --save https://dep2+version-branch-tag

```

The latter two commands would fetch the specified versions of dep1 and dep2 into `/zig-pkg/` and add entries into build.zig.zon, then build.zig would need commands that define “proj1” with a source root file at `/proj1/main.zig`, dep1 as the module from the dep1 dependency, and dep2 as the module from the dep2 dependency, which allows `/proj1/main.zig` to use `@import("dep1")` and `@import("dep2")`.

Once that’s defined, you could define `zig build install` to build the proj1 binary and `zig build run` to run it.

---

<div class="post-metadata">

**Author:** ![mwr](https://ziggit.dev/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mwr](https://ziggit.dev/u/mwr)\
**Post date:** [May 29, 2026, 9:35pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/25 "2026-05-29T21:35:05Z")

</div>

> [@Chaz](#):
>
> I’d expect something more like

I’m interested in discussing a fully local build first. For many reasons.

---

<div class="post-metadata">

**Author:** ![Chaz](https://ziggit.dev/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@Chaz](https://ziggit.dev/u/Chaz)\
**Post date:** [May 29, 2026, 9:36pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/26 "2026-05-29T21:36:23Z")

</div>

Okay, as a purely local example, manually copy into /vendor/dep1 and then you’d manually add an entry to build.zig.zon using `.path = /vendor/dep1` instead of using `zig fetch`, otherwise it’s the same.

---

<div class="post-metadata">

**Author:** ![mwr](https://ziggit.dev/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mwr](https://ziggit.dev/u/mwr)\
**Post date:** [May 29, 2026, 9:45pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/27 "2026-05-29T21:45:10Z")

</div>

@Chaz

Build condition: no paths should be changed.  
It seems to me that it is very important to make a build architecture so that the user doesn’t have to adjust to the build, but the build can flexibly adjust to any user’s tasks. Golang and Rust, by the way, also had problems with this. And there were also heated discussions, which gave rise to new interesting solutions.

---

<div class="post-metadata">

**Author:** ![Chaz](https://ziggit.dev/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@Chaz](https://ziggit.dev/u/Chaz)\
**Post date:** [May 29, 2026, 9:49pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/28 "2026-05-29T21:49:20Z")

</div>

> [@mwr](#):
>
> Build condition: no paths should be changed.

Curious. So you want to add the restriction that `build.zig` and `build.zig.zon` (which obviously didn’t exist before) must be in separate directories from each other?

---

<div class="post-metadata">

**Author:** ![mwr](https://ziggit.dev/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mwr](https://ziggit.dev/u/mwr)\
**Post date:** [May 29, 2026, 9:50pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/29 "2026-05-29T21:50:20Z")

</div>

> [@Chaz](#):
>
> So you want to add the restriction that `build.zig` and `build.zig.zon` (which obviously didn’t exist before) must be in separate directories from each other?

Yes, these can be different mount points, including completely different remote devices. There may already be established strict policies within the company regarding distributed build exclusively within its own perimeter.

---

<div class="post-metadata">

**Author:** ![Chaz](https://ziggit.dev/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@Chaz](https://ziggit.dev/u/Chaz)\
**Post date:** [May 29, 2026, 9:51pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/30 "2026-05-29T21:51:01Z")

</div>

I don’t think that’s going to work.

Build.zig.zon is the comptime data part of a build.zig. They are two halves of a single build script.

---

<div class="post-metadata">

**Author:** ![mwr](https://ziggit.dev/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mwr](https://ziggit.dev/u/mwr)\
**Post date:** [May 29, 2026, 10:23pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/31 "2026-05-29T22:23:38Z")

</div>

> [@Chaz](#):
>
> Build.zig.zon is the comptime data part of a build.zig. They are two halves of a single build script.

Yep, but it’s at least very strange if all the build scenarios encounter explicit and implicit problems. And this is a reason not to be afraid to discuss it, but rather to encourage such discussions.

> [@Chaz](#):
>
> I don’t think that’s going to work.

So it would be interesting for me to discuss this with those who consider themselves experts in the build system.  
I’m going to get a little (or a lot) distracted. But I’ll be blunt as usual. Again, using a specific example.  
In Golang, they broke compatibility in the latest version. And in the cryptography foundations. Moreover, no one has ever done it in my memory. The reasons for what happened can be discussed separately for a long time, but now the consequences are important. People started coming (and not just anyone, but the guys from `Hashicorp`), asking questions, their team didn’t have any logical answers, so it all came down to the fact that we made a decision, and shut up. But I continued to ask uncomfortable questions because I considered myself a part of the community, because Golang saved a lot of my team’s time in business projects, and I considered it important to give something in return, to help the development with the community. How did the team respond in the end? At first they started hiding my questions, and then when they got tired of it, they just banned me.  
Why did they do that? First of all, because they serve the interests of a rather large corporation, for which people are goods and dust under their feet. But not only that. Behind this lies the fact that they simply don’t care about the development of the language, they only care about their salaries, bonuses, social status, etc. It’s worth taking all this away from them, and their real attitude to the language will immediately become apparent.  
What am I getting at?  
I believe that we have the one life, and we need to live it with dignity, without hiding our opinions and views, expressing them directly to our colleagues, criticizing any shortcomings. This is the only way to improve things, this is the only way to fix problems, this is the only way to develop.  
I’ve already seen a lot of projects where people were initially forbidden to discuss certain things, and then the prohibitions became total. This is how excellent open mass projects turn into dogma-limited sects. I’ve seen this before, and therefore, if something like this is also planned here in the end, then tell me right away, and then I won’t interfere with the calm course of discussions, and I’ll only write to the issue tracker about obvious bugs.

---

<div class="post-metadata">

**Author:** ![Chaz](https://ziggit.dev/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@Chaz](https://ziggit.dev/u/Chaz)\
**Post date:** [May 29, 2026, 10:34pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/32 "2026-05-29T22:34:16Z")

</div>

I mean, discuss what you want but “you must split the two build files into separate directories” feels arbitrary to me. Maybe you want to build your own thing from scratch?

And, I mean, go for it. I’ll recommend learning more first and then generating build.zig code (rather than all the individual build-exe commands).

---

<div class="post-metadata">

**Author:** ![mwr](https://ziggit.dev/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mwr](https://ziggit.dev/u/mwr)\
**Post date:** [May 29, 2026, 10:46pm UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/33 "2026-05-29T22:46:14Z")

</div>

@Chaz

I still see the problem, as in some scenarios `build.zig.zon` is lost. But it’s still like a package manifest. In Golang and Rust, this is a key element of their modular systems, and users don’t even have to think about the complexity of their entire build system: users simply add a few fields to this manifest and the whole build works. And this is very important, because one team can write a project, and another team (which doesn’t have to know anything about the language at all) can build/run a project.  
Immediately, users have to think constantly during build, moreover, it becomes extremely important to know the language well during build. And I think this is an important issue. But I don’t have any concrete suggestions yet. We must think, we must discuss.

---

<div class="post-metadata">

**Author:** ![andrewrk](https://ziggit.dev/user_avatar/ziggit.dev/andrewrk/32/7011_2.png) [@andrewrk](https://ziggit.dev/u/andrewrk)\
**Post date:** [May 30, 2026, 12:20am UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/34 "2026-05-30T00:20:08Z")

</div>

> [@mwr](#):
>
> How did the team respond in the end? At first they started hiding my questions, and then when they got tired of it, they just banned me.

It sounds like you lack self awareness. Perhaps you were being unconstructive, just as you are being in this thread, and they got tired of dealing with you.

If you want people to take you more seriously then you have to start trying to empathize more with your audience. Your posts here just make you seem clueless, both technically, and in terms of your understanding of what other people are thinking.

Have you actually used the zig build system at all? Are you making suggestions based on absolutely no first hand experience?

If the answer is “no” and “yes”, then there’s your problem. That’s an extremely anti social thing to do.

If the answer is “yes” and “no”, then you are completely failing to show and communicate that fact to the people reading your forum posts.

People here are being very patient with you and trying to help you fit in, but since you mentioned you enjoy bluntness, I’ll give it to you straight: you’re not going to be tolerated very long here either if you can’t learn how to take on a more collaborative way of engaging with people.

Sincerely, good luck

---

<div class="post-metadata">

**Author:** ![vulpesx](https://ziggit.dev/user_avatar/ziggit.dev/vulpesx/32/3989_2.png) [@vulpesx](https://ziggit.dev/u/vulpesx)\
**Post date:** [May 30, 2026, 4:26am UTC](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788/36 "2026-05-30T04:26:32Z")

</div>

not particularly relevant… but…

> [@alanza](#):
>
> A tool like `cargo` would sit one layer _above_ the Zig Build System and try to restore the trust that (understandably) is broken by `zig build`’s ability to: 1) fetch arbitrary tarballs and 2) execute arbitrary code, including code within those tarballs.

`cargo` really is not better in that regard, crates can include arbitrary files and rust also has a `build.rs` that can have arbitrary code.

It is not often used because `cargo` provides most functionality, and `build.rs` is very obviously an afterthought.

[Previous page](https://ziggit.dev/t/discussion-of-zig-build-and-lower-level-direct-invocations/15788.md?page=1)
