Zig 0.15.1 Released

(0.15.0 was retracted)

63 Likes

Carmen’s illustrations are amazing and steal the show.

15 Likes

awesome, now i can start learning zig :grin: i waited until 0.15 release because of the new changes

2 Likes

Congratulations :tada: - that’s a massive amount of work! Small typo:

a better appraoch—less prone to typos

2 Likes

{t} is shorthand for @tagName() and @errorName()

I didn’t know I needed this feature, but I’m sold on it.

9 Likes

Every single one is so sticker-worthy!

Congratulations on the release. most of the transition in my library was easy.

I am hitting one snag: How do I print an array of strings as an array of strings? {s} used to work not it does not

3 Likes

Possibly unrelated - master branch builds (currently pointing to 0.15.1) throw a 404 when downloading from Download ⚡ Zig Programming Language

damn this thing is fast! great work on the release! looking forward to the improvements to come

2 Likes

Congrats, looking forward to giving it a whirl!
Do you track/publish download stats? Just wondering about the breakdown for what platforms people are now developing on.

Omg… now I have to start recoding my IO and boundedarrays :slight_smile:
Dear users: expect a plethora of threads from this noob.

3 Likes

Congrats on the release!

(update: ah cheered to soon unfortunately, see the PS)

Btw, my emulators (GitHub - floooh/chipz: 8-bit emulator experiments in Zig) are now fast(-ish) in debug mode with the x86 backend (well fast enough to easily run in realtime in debug mode) - previously they suffered heavily from a large switch-statement that was evaluated with a linear search.

Cool stuff :slight_smile:

PS: ah doh, looks like I spoke too soon, I tested on Windows - but it just occured to me that the problems happened on Linux, and there 0.15.1 indeed still seems to have a ‘linear-search-in-switch’ performance problem. I guess Windows still uses the LLVM backend? Tbf though I was wondering why the build times on Windows wasn’t any faster than I remembered… and on Linux this is indeed drastically reduced.

13 Likes

ArrayListarray_list.Managed and BoundedArray feel just right!

3 Likes

Waiting for zls updates.

3 Likes

Either Debian 13 coming out or this release made zig build --watch -fincremental work for me. Which is awesome! The rebuilds are literally a few ms.

2 Likes

How unfortunate I am to be working on a text editor amongst an overhaul to the io… Otherwise, great update!

2 Likes

Performance datapoint:

  • simple pure-zig serialization library for messagepack, no dependencies
  • approx. 3000 lines of code
  • executes all the unit tests
  • 6 year old laptop, x86_64-linux (debian 13)
  • debug mode

zig 0.14.0: 19.829s
zig 0.15.1 (force llvm): 11.781s
zig 0.15.1: 6.714s

:high_voltage: 66% faster!!!

Reproduction steps
# Use anyzig so it auto-detects the zig version from build.zig.zon.
# Run multiple times so that anyzig doesn't have to download zig.
# Use fastest times.

git clone git@github.com:jeffective/lizpack.git
cd lizpack
git checkout 7a9f083462f13ad33fcb3a461b069815592afbc2 # head of main today
rm -rf .zig-cache/
time zig build
# this is the result for zig 0.15.1
real	0m6.714s
user	0m11.598s
sys	0m1.871s

git checkout f4a5605300a23c071ce82abf29ab751bc6ec749a
rm -rf .zig-cache/
time zig build
# this is the result for zig 0.14.0
real	0m19.829s
user	0m21.361s
sys	0m2.282s

git checkout 7a9f083462f13ad33fcb3a461b069815592afbc2 # head of main today
rm -rf .zig-cache/
# modify build script with use_llvm = true everywhere
time zig build
# this is the result for zig 0.15.1 (use llvm)
real	0m11.781s
user	0m16.243s
sys	0m2.245s


6 Likes

Nothing to worry about, the Io overhaul will be much more straightforward than Writergate. The worst is already behind us. Writergate required effectively rewriting all stream implementations; meanwhile, the Io overhaul will be trivial updates like this:

-var file_reader = file.reader(&.{});
+var file_reader = file.reader(io, &.{});
9 Likes

So does incremental watch already work on windows with -fincremental -Dno-bin or is it still not usable because of linker availability?

I wonder how advisable it is to start using await and async as function/variable names.