# Quiet zig build progress bar output

**URL:** <https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977>\
**Category:** Help\
**Tags:** build-system\
**Created:** [November 23, 2024, 11:01am UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977 "2024-11-23T11:01:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcohler](https://ziggit.dev/user_avatar/ziggit.dev/gcohler/32/3097_2.png) [@gcohler](https://ziggit.dev/u/gcohler)\
**Post date:** [November 23, 2024, 11:01am UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977/1 "2024-11-23T11:01:58Z")

</div>

When building with zig-build, the system outputs a huge stream of printouts to stderr (aka the progress bar) showing the build system’s traversal of the DAG. Is there a way to shut off that printout (short of `2 > /dev/null`)? Just curious. My goal is to be able to do something like `zig build --release=safe --summary all` on a working program and to have the only printout be the summary at the end.

---

<div class="post-metadata">

**Author:** ![ktz\_alias](https://ziggit.dev/user_avatar/ziggit.dev/ktz_alias/32/1202_2.png) [@ktz\_alias](https://ziggit.dev/u/ktz_alias)\
**Post date:** [November 23, 2024, 11:48am UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977/2 "2024-11-23T11:48:45Z")

</div>

You can use a environment variable `ZIG_PROGRESS` to change desired stdio but I did not try it.

See also:

[https://andrewkelley.me/post/zig-new-cli-progress-bar-explained.html](https://andrewkelley.me/post/zig-new-cli-progress-bar-explained.html)

---

<div class="post-metadata">

**Author:** ![gcohler](https://ziggit.dev/user_avatar/ziggit.dev/gcohler/32/3097_2.png) [@gcohler](https://ziggit.dev/u/gcohler)\
**Post date:** [November 23, 2024, 12:16pm UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977/3 "2024-11-23T12:16:14Z")

</div>

Thank you. I gave it a try with the command below (by pointing to a non-existent device number). It worked partially – i.e. some of the progress bar was eliminated. But overall, it didn’t work.

I guess it would be nice if there were a `--quiet` option on zig build that suppressed it more successfully. While in most cases the progress bar is helpful, there are cases where it results in thousands of lines on screen – which is not helpful.

Please let me know if you would like me to make this enhancement request via another method.

Thank you very much.

```zig
$ ZIG_PROGRESS=99 zig build --release=safe --summary all

```

---

<div class="post-metadata">

**Author:** ![gcohler](https://ziggit.dev/user_avatar/ziggit.dev/gcohler/32/3097_2.png) [@gcohler](https://ziggit.dev/u/gcohler)\
**Post date:** [November 23, 2024, 2:28pm UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977/4 "2024-11-23T14:28:50Z")

</div>

Plus I failed to mention above. But the progress bar doesn’t work on Windows – hence my objection because I get thousands of lines rather than one continuously self-overwriting line. So this could also be considered a bug.

---

<div class="post-metadata">

**Author:** ![mnemnion](https://ziggit.dev/user_avatar/ziggit.dev/mnemnion/32/2478_2.png) [@mnemnion](https://ziggit.dev/u/mnemnion)\
**Post date:** [November 23, 2024, 2:41pm UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977/5 "2024-11-23T14:41:28Z")

</div>

> [@gcohler](#):
>
> the progress bar doesn’t work on Windows – hence my objection because I get thousands of lines rather than one continuously self-overwriting line. So this could also be considered a bug.

This should be filed as such on the issue board, please check first to see if it’s already tracked.

Your best bet is to replace the test runner, at the moment. I wrote [ztap](https://github.com/mnemnion/ztap) in order to generate [TAP](https://testanything.org/) format from tests, you’re of course welcome to use it, but it’s also a good skeleton for adding your own custom test runner. It’s a fairly simple process.

---

<div class="post-metadata">

**Author:** ![gcohler](https://ziggit.dev/user_avatar/ziggit.dev/gcohler/32/3097_2.png) [@gcohler](https://ziggit.dev/u/gcohler)\
**Post date:** [November 23, 2024, 2:54pm UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977/6 "2024-11-23T14:54:33Z")

</div>

Thank you. I filed [Progress Bar "loses sync" under windows and spews 100's of lines · Issue #22055 · ziglang/zig · GitHub](https://github.com/ziglang/zig/issues/22055) in the repo.

I’m not running tests. Just trying to avoid the progress bar when building / compiling.

---

<div class="post-metadata">

**Author:** ![mnemnion](https://ziggit.dev/user_avatar/ziggit.dev/mnemnion/32/2478_2.png) [@mnemnion](https://ziggit.dev/u/mnemnion)\
**Post date:** [November 23, 2024, 2:57pm UTC](https://ziggit.dev/t/quiet-zig-build-progress-bar-output/6977/7 "2024-11-23T14:57:31Z")

</div>

> [@gcohler](#):
>
> I’m not running tests. Just trying to avoid the progress bar when building / compiling.

Custom build runners are also possible, but I think it’s safe to say that doing that is a bigger commitment than replacing the test runner.
