There are quite a few language changes that have a theme of improving ergonomics. Both the language and standard library are still considered unstable. The build system is no longer considered...
There are quite a few language changes that have a theme of improving ergonomics. Both the language and standard library are still considered unstable.
The build system is no longer considered experimental and they've started on package management.
There is no "official" package repository: packages are simply arbitrary directory trees which can be local directories or archives from the Internet.
By that, they mean that the compiler will download tar.gz or tar.xf files from the Internet. The build file must contain a hash, though, so I guess it's somewhat safe? It's basically "trust on first use."
The information provided is the package name and version, and a list of dependencies, each of which has a name, a URL to an archive, and a hash. The hash is not of the archive itself, but of its contents. In order to find it, it can be omitted from the file, and zig build will emit an error containing the expected hash. There will be tooling in future to make this file easier to modify.
The package config file is specified in ZON (Zig Object Notation) which is a format they just invented for this.
The biggest internal change:
During this release cycle, the C++ implementation of Zig was deleted. The -fstage1 flag is no longer a recognized command-line parameter.
Zig is now bootstrapped using a 2.4 MiB WebAssembly file and a C compiler. Please enjoy this blog post which goes into the details: Goodbye to the C++ Implementation of Zig.
Also, they now have reproduceable builds (byte for byte identical), except for debug mode.
Many more changes to come:
The major themes of the 0.12.0 release cycle will be language changes, compilation speed, and package management.
There are quite a few language changes that have a theme of improving ergonomics. Both the language and standard library are still considered unstable.
The build system is no longer considered experimental and they've started on package management.
By that, they mean that the compiler will download tar.gz or tar.xf files from the Internet. The build file must contain a hash, though, so I guess it's somewhat safe? It's basically "trust on first use."
The package config file is specified in ZON (Zig Object Notation) which is a format they just invented for this.
The biggest internal change:
Also, they now have reproduceable builds (byte for byte identical), except for debug mode.
Many more changes to come: