Repository navigation
v0.3.4
dagger-zig v0.3.4 — Community Update
The headline
dagger call now works. This release fixes the core runtime path that prevented Zig modules from loading in the Dagger engine. If you tried to use dagger-zig before and hit failed to call module to get functions: call constructor: exit code: 1, this is the fix.
What was broken
The Zig SDK library lived at the repository root (src/), one level above the sdk/ directory that the Dagger engine clones when a user references the SDK. When ModuleRuntime tried to build a user's Zig module inside the engine container, @import("dagger_sdk") had nothing to resolve against — the library wasn't there. Codegen compounded the problem by emitting a dagger.gen.zig that imported dagger_sdk without declaring the dependency or generating any build files.
The result: every dagger call and dagger develop against a Zig module failed at the constructor stage.
What we fixed
-
Vendored the library inside the SDK module. Moved
src/→sdk/lib/src/so the Zig library ships inside the SDK module that the engine clones. Added a consumer-facingsdk/lib/build.zig+build.zig.zonthat exposesdagger_sdkviab.dependency(). -
Rewrote
ModuleRuntime. Now mountssdk/lib(the Zig library, not the Go bootstrap tree) at/sdk-lib. The build script symlinks/sdk-lib→.dagger-sdk-libso the generatedbuild.zig.zon's relative.pathresolves regardless of the module's source subpath. -
Rewrote
Codegen. Now emits three files for every user module:build.zig— wiresdagger_sdkas a dependency and installs amoduleexecutable via themodule-runtimestepbuild.zig.zon— declares thedagger_sdkpath dependency (with thefingerprintfield Zig 0.16 requires)internal/dagger/dagger.gen.zig— re-export shim so@import("dagger")works too
-
Fixed the CI pipeline module. The
ci/pipeline/build.zigreferenced../../sdk/lib/src/root.zigdirectly, which doesn't exist inside the container. Switched tob.dependency("dagger_sdk", ...)with a properbuild.zig.zon. -
Forked otel-go to drop vulnerable transitive dependencies from the Go SDK bootstrap.
-
Applied
zig fmtto all unformatted source files.
Verified end-to-end
$ dagger develop
# → generated build.zig + build.zig.zon + internal/dagger/dagger.gen.zig
$ dagger call hello
hello from dagger-zig module runtime
The full runtime path — codegen, ModuleRuntime, Zig build in-container, entrypoint dispatch, function call — works.
Supply chain
Every release artifact is signed and attested:
| Attestation | How to verify |
|---|---|
| Cosign signature | cosign verify-blob --bundle <file>.bundle --certificate-identity 'https://github.com/MChorfa/dagger-zig/.github/workflows/release.yml@refs/tags/v0.3.4' --certificate-oidc-issuer https://token.actions.githubusercontent.com <file> |
| GitHub attestation | gh attestation verify <file> --repo MChorfa/dagger-zig |
| SLSA L3 provenance | slsa-verifier verify-artifact <tarball> --provenance-path multiple.intoto.jsonl --source-uri github.com/MChorfa/dagger-zig --source-tag v0.3.4 |
| SBOM | sbom.spdx.json and sbom.cdx.json included in release assets |
Downloads
| Target | Asset |
|---|---|
| aarch64 Linux | dagger-zig-v0.3.4-aarch64-linux-gnu.tar.gz |
| x86_64 Linux | dagger-zig-v0.3.4-x86_64-linux-gnu.tar.gz |
| aarch64 macOS | dagger-zig-v0.3.4-aarch64-macos.tar.gz |
| x86_64 macOS | dagger-zig-v0.3.4-x86_64-macos.tar.gz |
Verify with sha256sum -c checksums.sha256.
Getting started
# In your Dagger module directory:
dagger init --sdk github.com/MChorfa/dagger-zig/sdk@v0.3.4
dagger develop
dagger call helloWhat's next
- More example modules (container builds, parallel pipelines, SBOM generation)
- SPIFFE workload identity integration for zero-trust CI
- Improved error messages from the Zig dispatch layer
Thanks
To everyone who reported the runtime failure and helped trace it — this fix is for you.
Full changelog: v0.3.3...v0.3.4