Repository navigation
Stop forcing libc on Baz modules and examples - #12
Merged
Merged
Conversation
Baz itself makes no libc calls; its fatal paths use the engine's failFast. The build no longer sets link_libc on the Baz module, the examples, the tests or the embedding consumer, and pins the engine branch of bounded-http PR #8, which makes direct system calls on Linux when no libc is linked. A Linux Baz application now builds as one static executable with no interpreter and no dynamic section. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Engine bb9a5bf is main after bounded-http #8 merged; the package hash is unchanged, so the merged tree is the one tested on the branch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Baz and its engine are pure Zig, but both build scripts set
.link_libc = true, so every Baz application linked a libc. Consumers such as omajot want one static Linux binary without an interpreter or shared libraries.What
build.zigandexamples/embedding/build.zigno longer setlink_libc(module, examples, tests, embedding consumer). Baz makes no libc calls itself; its fatal paths already use the engine'sfailFast.2067d9438ec6d5a240b6acdce81c04f5c434bec3), which makes direct system calls on Linux when no libc is linked. Merge Add themed Zig API reference and link documentation to declarations #8 first, then re-pin to the engine's mergedmain(as with Add a per-route request deadline for long streams #10).README.md(Platform support) anddocs/DEPENDENCY.mddocument "No libc on Linux".Evidence (exact Zig 0.16.0, Linux omarx1, measurement lock held)
zig build verifyDebug and ReleaseSafe: 71/71 steps, 245/245 tests each.zig build install examples -Doptimize=ReleaseSafe, then all suites pass: app 14, examples 23, streaming 14, continuations 24, cookies 14, middleware 15, session 17, mustache 12, borrow 9, jobs 22, CLI 392.hello(native target and-Dtarget=x86_64-linux-none):statically linked, noPT_INTERP, "There is no dynamic section in this file."; the-linux-nonebuild servesHTTP/1.1 200 OK.🤖 Generated with Claude Code