Zig Build System on Unsupported Platforms #7243
Labels
standard library
This issue involves writing Zig code for the standard library.
zig build system
std.Build, the build runner, `zig build` subcommand, package management
Milestone
Zig limits the scope of its standard library to a finite set of platforms/operating systems. For example, Zig drops support for older Windows/MacOS versions when their support is dropped by Microsoft/Apple. Note that this doesn't mean you can't run Zig code on these platforms, just that some of the standard library probably won't work. If someone wants to run Zig code on these platforms, they can limit their usage of the standard library, or, they can leverage designs to add unofficial platform support into the standard library through user packages. I anticipate we may have a "WindowsLegacy" package and "MacOSLegacy" package that you can reference to make your programs work on these older platforms.
However, the issue with this approach comes with the Zig Build System. Zig's build system is written in Zig code which uses the standard library, and, some basic file IO operation that the build system needs will not be supported on the legacy operating systems (i.e. #7242). It becomes a chicken and egg problem where the zig build system is needed to get the legacy packages to support older platforms, but the legacy packages are also needed by the zig build system to run on these platforms in the first place.
In order to allow the zig build system to work on these unsupported platforms, there needs to be some type of bootstrap operation that the zig build system does before it tries to compile any Zig code from
build.zig
. I don't have a concrete proposal to solve this issue, but I hope we can keep this issue in mind and come up with a plan to solve it before 1.0.The text was updated successfully, but these errors were encountered: