You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create branch libc17-704 that starts at Zig 0.17.0-dev.704 and incrementally ports all of the
musl-libc-in-Zig (libzigc) work from ctaggart/zig@libc/0.16.x, so we can tag 0.17.0-dev.704.libc.1 and publish a release like ctaggart/zig 0.16.0-libc.5 — but without the .sha256 sidecars.
ctaggart/zig@libc/0.16.x = 444 commits on top of that same 24fdd5b7a (0.16.0) base.
⇒ Conceptually git rebase --onto b8cb78023 24fdd5b7a libc/0.16.x: replay 444 commits across 704 commits of upstream drift. Do it incrementally and CI-gated, not as one giant rebase.
Upstream already ships lib/c/ + lib/c.zig at both commits and added/changed files by 0.17 (e.g. new lib/c/pthread.zig), so expect real 3-way conflicts in exactly the files the fork edits.
Scope of the fork delta (444 commits, ~1000 files)
lib/libc/** (~921) — musl sources; many become commented-out manifest entries, not hand-ported code.
lib/c/*.zig (~52) + lib/c.zig — the hand-written Zig implementations (the real work).
src/libs/musl.zig — the migration manifest (comments out migrated .c/.s entries). Also src/libs/mingw.zig, src/libs/wasi_libc.zig, src/codegen/llvm/FuncGen.zig.
⚠️ Do not port the accidentally committed build artifacts libc.a and c.o (add to .gitignore).
Release pipeline (what "tag → release" requires)
Mirror build-release.yml (currently only on ctaggart/zig; missing from cataggar/zig along with scripts/sign-asset.exp). Per-target it: downloads the host-zig mirrorv$ZIG_VERSION + the prebuilt llvm-zig, runs zig build -Denable-llvm -Dstatic-llvm -Doptimize=Debug -Dno-langref -Duse-zig-libcxx -Dversion-string=$TAG --search-prefix $LLVM_PREFIX,
packages, minisign-signs, then gh release upload.
Phases 2…N — migration categories (mirror the #305–#361 tiers; one PR per category, each = the relevant lib/c/*.zig + the matching "migrated" comment-outs in src/libs/musl.zig, gated by test-libc.yml across all 10 targets):
mman / sched / misc / conf → stdio → math → time → process → signal → network (lib/std + lib/c) → env/__init_tls → fenv (all arches) → thread / ldso / setjmp → legacy / exit.
Phase final — Windows + cross libc.lib/c/win32/* (#248 phases 0/1/2/4/6/7/8), src/libs/mingw.zig, src/libs/wasi_libc.zig, lib/c/wasi_*.
Release. Tag 0.17.0-dev.704.libc.1; run build-release.yml; verify the release has only *.tar.xz / *.zip + *.minisig (no *.sha256); confirm ghr install cataggar/zig@0.17.0-dev.704.libc.1 RWSuACSgOY8bwS0fMGytTyBlrVQsUtK/6ydxuOT/OjzlnFx2go0w1DX5 works.
Definition of done
libc17-704 builds and passes test-libc.yml on all targets at parity with libc/0.16.x (only the 2 intentionally-retained setjmp-tail .c files remain).
Release 0.17.0-dev.704.libc.1 published with signed (.minisig) archives and no .sha256 sidecars.
Plan:
libc17-704branch — port libzigc onto Zig 0.17.0-dev.704, release0.17.0-dev.704.libc.1Create branch
libc17-704that starts at Zig 0.17.0-dev.704 and incrementally ports all of themusl-libc-in-Zig (libzigc) work from
ctaggart/zig@libc/0.16.x, so we can tag0.17.0-dev.704.libc.1and publish a release likectaggart/zig 0.16.0-libc.5— but without the.sha256sidecars.Background: ctaggart/zig#10. Reference release: 0.16.0-libc.5.
Prerequisite (blocking)
llvm-zigLLVM 22 build (llvmorg-22.1.2). Zig 0.17.0-dev.704'sCMakeLists.txtpinsfind_package(llvm 22)(0.16.0 pinnedllvm 21), so the existing 21.1.8 LLVMcannot be used.
Verified topology
b8cb780230197ce7e7e3059c7e37e1a40d9dcfc2= Zig 0.17.0-dev.704 = exactly 704 commits past24fdd5b7a("Release 0.16.0").ctaggart/zig@libc/0.16.x= 444 commits on top of that same24fdd5b7a(0.16.0) base.git rebase --onto b8cb78023 24fdd5b7a libc/0.16.x: replay 444 commits across 704 commits of upstream drift. Do it incrementally and CI-gated, not as one giant rebase.lib/c/+lib/c.zigat both commits and added/changed files by 0.17 (e.g. newlib/c/pthread.zig), so expect real 3-way conflicts in exactly the files the fork edits.Scope of the fork delta (444 commits, ~1000 files)
lib/libc/**(~921) — musl sources; many become commented-out manifest entries, not hand-ported code.lib/c/*.zig(~52) +lib/c.zig— the hand-written Zig implementations (the real work).src/libs/musl.zig— the migration manifest (comments out migrated.c/.sentries). Alsosrc/libs/mingw.zig,src/libs/wasi_libc.zig,src/codegen/llvm/FuncGen.zig.lib/std/*touch-ups (c.zig,builtin.zig,math*,os/linux.zig),test/libc.zig,test/behavior/var_args.zig..github/workflows/{build-release,test-libc,lint-libc-migration,...}.yml,scripts/sign-asset.exp,doc/libc-release-notes.md, copilot instructions,.gitattributes/.gitignore.libc.aandc.o(add to.gitignore).Release pipeline (what "tag → release" requires)
Mirror
build-release.yml(currently only onctaggart/zig; missing from cataggar/zig along withscripts/sign-asset.exp). Per-target it: downloads the host-zig mirrorv$ZIG_VERSION+ the prebuiltllvm-zig, runszig build -Denable-llvm -Dstatic-llvm -Doptimize=Debug -Dno-langref -Duse-zig-libcxx -Dversion-string=$TAG --search-prefix $LLVM_PREFIX,packages, minisign-signs, then
gh release upload.Adaptations for 0.17:
ZIG_VERSION = 0.17.0-dev.704+b8cb78023— host mirror already exists in cataggar/zig (v0.17.0-dev.704+b8cb78023, assetszig-<arch>-<os>-0.17.0-dev.704+b8cb78023.{tar.xz,zip}).LLVM_VERSION = 22.1.2; downloadllvm-zig-22.1.2-<target>from cataggar/llvm-project (Build llvm-zig for LLVM 22 (llvmorg-22.1.2) — prerequisite for cataggar/zig libc 0.17 llvm-project#4).-Dversion-string = 0.17.0-dev.704.libc.1⇒ assetszig-<target>-0.17.0-dev.704.libc.1.{tar.xz,zip}..sha256generation (shasum/Get-FileHashsteps) and drop.sha256from artifact +gh release uploadglobs. Keep the minisign step →.minisigsidecars only.MINISIGN_SECRET_KEY,MINISIGN_PASSWORD(ghr public keyRWSuACSgOY8bwS0fMGytTyBlrVQsUtK/6ydxuOT/OjzlnFx2go0w1DX5).x86_64-linux,aarch64-macos,x86_64-windows-msvc(x86_64-macos excluded, as upstream).Phased work
libc17-704fromb8cb78023. Porttest-libc.yml,lint-libc-migration.yml,build-release.yml(0.17 / LLVM 22 / no-sha256 / cataggar URLs),scripts/sign-asset.exp, copilot instructions,doc/libc-release-notes.md. Addlibc.a/c.oto.gitignore. Confirmtest-libc.ymlruns green on the clean 0.17 base.lib/c.zigwiring +src/libs/musl.zigmanifest plumbing + core helpers (lib/c/internal.zig,errno.zig,ctype.zig,string.zig,stdlib.zig), resolving against upstream's evolvedlib/c/*.lib/c/*.zig+ the matching "migrated" comment-outs insrc/libs/musl.zig, gated bytest-libc.ymlacross all 10 targets):mman / sched / misc / conf → stdio → math → time → process → signal → network (
lib/std+lib/c) → env/__init_tls→ fenv (all arches) → thread / ldso / setjmp → legacy / exit.lib/c/win32/*(#248 phases 0/1/2/4/6/7/8),src/libs/mingw.zig,src/libs/wasi_libc.zig,lib/c/wasi_*.0.17.0-dev.704.libc.1; runbuild-release.yml; verify the release has only*.tar.xz/*.zip+*.minisig(no*.sha256); confirmghr install cataggar/zig@0.17.0-dev.704.libc.1 RWSuACSgOY8bwS0fMGytTyBlrVQsUtK/6ydxuOT/OjzlnFx2go0w1DX5works.Definition of done
libc17-704builds and passestest-libc.ymlon all targets at parity withlibc/0.16.x(only the 2 intentionally-retained setjmp-tail.cfiles remain).0.17.0-dev.704.libc.1published with signed (.minisig) archives and no.sha256sidecars.