Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zig Build System on Unsupported Platforms #7243

Open
marler8997 opened this issue Nov 28, 2020 · 1 comment
Open

Zig Build System on Unsupported Platforms #7243

marler8997 opened this issue Nov 28, 2020 · 1 comment
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

Comments

@marler8997
Copy link
Contributor

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.

@andrewrk andrewrk added this to the 0.9.0 milestone Nov 30, 2020
@andrewrk andrewrk added zig build system std.Build, the build runner, `zig build` subcommand, package management standard library This issue involves writing Zig code for the standard library. labels Nov 30, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@nektro
Copy link
Contributor

nektro commented Jul 26, 2021

Could this be done with the WindowsLegacy and MacOSLegacy packages providing an os export than you could then use to incorporate with Zig's BYOS and the root.os export?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants