Supersedes/migrated from: https://github.com/ziglang/zig/issues/24560
When filling in Zig code (#30978) for established libc ABIs such as musl, MinGW-w64, etc, we cannot deviate from those ABIs in any observable way, which means we inherit any quirks that they have, and we cannot extend the API surface in any way. We also would like to define a freestanding subset of Zig libc, but this can't be done under the names of those established libcs either.
So the task here is to define a completely distinct Zig libc ABI - think aarch64-linux-zig, x86_64-freestanding-zig, and so on. (In https://github.com/ziglang/zig/issues/20690 terms, the zig bit would be the api component.) With this ABI, we have the freedom to:
- Break with any legacy nonsense in existing libcs.
- Define consistent C ABI rules across targets.
- Offer a freestanding subset.
- Potentially extend the API surface.
- Author our own libc headers.
I'm currently cooking up an initial proposal for the ABI, which should be ready soon.
Supersedes/migrated from: https://github.com/ziglang/zig/issues/24560
When filling in Zig code (https://codeberg.org/ziglang/zig/issues/30978) for established libc ABIs such as musl, MinGW-w64, etc, we cannot deviate from those ABIs in any observable way, which means we inherit any quirks that they have, and we cannot extend the API surface in any way. We also would like to define a freestanding subset of Zig libc, but this can't be done under the names of those established libcs either.
So the task here is to define a completely distinct Zig libc ABI - think `aarch64-linux-zig`, `x86_64-freestanding-zig`, and so on. (In https://github.com/ziglang/zig/issues/20690 terms, the `zig` bit would be the `api` component.) With this ABI, we have the freedom to:
* Break with any legacy nonsense in existing libcs.
* Define consistent C ABI rules across targets.
* Offer a freestanding subset.
* Potentially extend the API surface.
* Author our own libc headers.
I'm currently cooking up an initial proposal for the ABI, which should be ready soon.