Skip to content

Stop forcing libc on Baz modules and examples - #12

Merged
renerocksai merged 2 commits into
mainfrom
feat/no-forced-libc
Sep 25, 2026
Merged

renerocksai merged 2 commits into
mainfrom
feat/no-forced-libc

Conversation

@renerocksai

Copy link
Copy Markdown
Contributor

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

Evidence (exact Zig 0.16.0, Linux omarx1, measurement lock held)

  • zig build verify Debug 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, no PT_INTERP, "There is no dynamic section in this file."; the -linux-none build serves HTTP/1.1 200 OK.
  • macOS and Windows: hosted CI (the engine change was verified natively on macOS in Add themed Zig API reference and link documentation to declarations #8).

🤖 Generated with Claude Code

renerocksai and others added 2 commits September 25, 2026 20:41
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>
@renerocksai
renerocksai merged commit c7d489a into main Sep 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant