You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgalt="Carmen the Allocgator" src="https://ziglang.org/img/Carmen_3.svg" style="height: 18em; float: right">
339
339
<p>
340
-
<ahref="https://ziglang.org/download/#release-0.15.0">Download & Documentation</a>
340
+
<ahref="https://ziglang.org/download/#release-0.15.1">Download & Documentation</a>
341
341
</p>
342
342
<p>
343
343
Zig is a general-purpose programming language and toolchain for maintaining
@@ -529,7 +529,7 @@ <h1>0.15.0 Release Notes</h1>
529
529
{#header_close#}
530
530
531
531
{#header_open|New Rules for Arithmetic on <code>undefined</code>#}
532
-
<p>Zig 0.15.0 begins to standardise the rules around how {#syntax#}undefined{#endsyntax#} behaves in different contexts—in particular, how it behaves as an operand to arithmetic operators. In summary, only operators which can never trigger Illegal Behavior permit {#syntax#}undefined{#endsyntax#} as an operand. Any other operator will trigger Illegal Behavior (or a compile error if evaluated at {#syntax#}comptime{#endsyntax#}) if any operand is {#syntax#}undefined{#endsyntax#}.</p>
532
+
<p>Zig 0.15.x begins to standardise the rules around how {#syntax#}undefined{#endsyntax#} behaves in different contexts—in particular, how it behaves as an operand to arithmetic operators. In summary, only operators which can never trigger Illegal Behavior permit {#syntax#}undefined{#endsyntax#} as an operand. Any other operator will trigger Illegal Behavior (or a compile error if evaluated at {#syntax#}comptime{#endsyntax#}) if any operand is {#syntax#}undefined{#endsyntax#}.</p>
533
533
<p>Generally, it is always best practice to avoid any operation on {#syntax#}undefined{#endsyntax#}. If you do that, this language change, and any that follow, are unlikely to affect you. If you are affected by this language change, you might see a compile error on code which previously worked:</p>
534
534
{#code|arith-on-undefined.zig#}
535
535
{#header_close#}
@@ -549,9 +549,6 @@ <h1>0.15.0 Release Notes</h1>
549
549
{#header_close#}
550
550
551
551
{#header_open|Standard Library#}
552
-
<p>Warning: Zig 0.15.0 was tagged with an HTTPS regression:
553
-
<ahref="https://github.com/ziglang/zig/issues/24911">HTTPS doesn't work on Windows</a>. If this
554
-
affects you, we recommend to wait until 0.15.1 before upgrading.</p>
<p>Warning: Zig 0.15.0 was tagged with a package fetching regression:
763
-
<ahref="https://github.com/ziglang/zig/issues/24911">HTTPS doesn't work on Windows</a>. If this
764
-
affects you, we recommend to wait until 0.15.1 is released before upgrading.</p>
765
759
<p>Uncategorized changes:</p>
766
760
<ul>
767
761
<li>TODO</li>
768
762
</ul>
769
763
770
764
{#header_open|macOS File System Watching#}
771
-
<p>The <code>--watch</code> flag to <code>zig build</code> is now supported on macOS. In Zig 0.14.0, the flag was accepted, but unfortunately behaved incorrectly with most editors. In Zig 0.15.0, this functionality has been <ahref="https://github.com/ziglang/zig/pull/24649">rewritten on macOS</a> to use the File System Events API for fast and reliable file system update watching.</p>
765
+
<p>The <code>--watch</code> flag to <code>zig build</code> is now supported on macOS. In Zig 0.14.0, the flag was accepted, but unfortunately behaved incorrectly with most editors. In Zig 0.15.x, this functionality has been <ahref="https://github.com/ziglang/zig/pull/24649">rewritten on macOS</a> to use the File System Events API for fast and reliable file system update watching.</p>
772
766
<p>So, if you were avoiding <code>--watch</code> in previous Zig versions due to the macOS bug, you can now use it safely. This is particularly useful if you are interested in trying {#link|Incremental Compilation#}, since the typical way to use that feature today involves passing the flags <code>--watch -fincremental</code> to <code>zig build</code>.</p>
<p>Zig 0.15.0 makes further progress on the work-in-progress Incremental Compilation functionality, which allows the compiler to perform very fast rebuilds by only re-compiling code which has changed. Various bugs have been fixed, particularly relating to changing file imports.</p>
796
+
<p>Zig 0.15.x makes further progress on the work-in-progress Incremental Compilation functionality, which allows the compiler to perform very fast rebuilds by only re-compiling code which has changed. Various bugs have been fixed, particularly relating to changing file imports.</p>
803
797
<p>This feature is still experimental—it has known bugs and can lead to miscompilations or incorrect compile errors. However, it is now stable enough in some contexts that much of the Zig core team have incorporated it into certain workflows; in particular, fixing large amounts of compile errors using incremental compilation with <code>-fno-emit-bin</code> usually works very well.</p>
804
798
<p>The next release cycle will continue to make progress towards enabling Incremental Compilation by default. In the meantime, if you are interested in trying this experimental feature, take a look at <ahref="https://github.com/ziglang/zig/issues/21165">#21165</a>.</p>
805
799
{#header_close#}
806
800
807
801
{#header_open|Threaded Codegen#}
808
-
<p>The Zig compiler is designed to be parallelized, so that different pieces of compilation work can run in parallel with one another to improve compiler performance. In the past the Zig compiler was largely single-threaded, but 0.14.0 introduced the ability for certain compiler backends to run in parallel with the frontend (Semantic Analysis). Zig 0.15.0 continues down this path by allowing Semantic Analysis, Code Generation, and Linking to <em>all</em> happen in parallel with one another. Code Generation in particular can itself be split across arbitrarily many threads.</p>
802
+
<p>The Zig compiler is designed to be parallelized, so that different pieces of compilation work can run in parallel with one another to improve compiler performance. In the past the Zig compiler was largely single-threaded, but 0.14.0 introduced the ability for certain compiler backends to run in parallel with the frontend (Semantic Analysis). Zig 0.15.x continues down this path by allowing Semantic Analysis, Code Generation, and Linking to <em>all</em> happen in parallel with one another. Code Generation in particular can itself be split across arbitrarily many threads.</p>
809
803
<p>Compared to 0.14.0, this typically leads to another performance boost when using self-hosted backends such as the {#link|x86 Backend#}. The improvement in wall-clock time varies from relatively insignificant to upwards of 50% depending on the specific code being compiled. However, as one real-world data point, building the Zig compiler using its own x86_64 backend got 27% faster on one system from this change, with the wall-clock time going from 13.8s to 10.0s.</p>
810
804
<p><ahref="https://ziglang.org/devlog/2025/#2025-06-14">This devlog</a> looks a little more closely at this change, but in short, you can expect better compiler performance when using self-hosted backends thanks to this parallelization. <ahref="https://asciinema.org/a/bgDEbDt4AkZWORDX1YBMuKBD3">Oh, and you get more detailed progress information too.</a></p>
811
805
{#header_close#}
@@ -822,7 +816,7 @@ <h1>0.15.0 Release Notes</h1>
822
816
{#header_close#}
823
817
824
818
{#header_open|Compile Tests to Object File#}
825
-
<p>Typically, Zig's testing functionality is used to build an executable directly. However, there are situations in which you may want to build tests without linking them into a final executable, such as for integration with external code which loads your application as a shared library. Zig 0.15.0 facilitates such use cases by allowing an object file to be emitted instead of a binary, and this object can then be linked however is necessary.</p>
819
+
<p>Typically, Zig's testing functionality is used to build an executable directly. However, there are situations in which you may want to build tests without linking them into a final executable, such as for integration with external code which loads your application as a shared library. Zig 0.15.x facilitates such use cases by allowing an object file to be emitted instead of a binary, and this object can then be linked however is necessary.</p>
826
820
<p>On the CLI, this is represented by running <code>zig test-obj</code> instead of <code>zig test</code>.
827
821
<p>When using the build system, it is represented through a new <code>std.Build</code> API. By passing the <code>emit_object</code> option to <code>std.Build.addTest</code>, you get a <code>Step.Compile</code> which emits an object file, which you can then use that as you would any other object. For instance, it can be installed for external use, or it can be directly linked into another step. However, note that when using this feature, the build runner does not communicate with the test runner, falling back to the default <code>zig test</code> behavior of reporting failed tests over stderr. Users of this feature will likely want to override the test runner for the compilation as well, replacing it with a custom one which communicates with some external test harness.</p>
828
822
{#header_close#}
@@ -879,7 +873,7 @@ <h1>0.15.0 Release Notes</h1>
879
873
<ahref="https://github.com/ziglang/zig/issues?q=is%3Aopen+is%3Aissue+label%3Amiscompilation">miscompilations</a>, and
0 commit comments