QUICKBEAM_BUILD=1 mix compile # build NIF from source (requires Zig 0.15+)
mix compile # use precompiled NIF
mix test # full suite (1300+ tests)Set QUICKBEAM_BUILD=1 for any compilation that touches Zig/C code.
Elixir → GenServer (Runtime/Context) → Zig NIFs (quickbeam.zig) → QuickJS-NG C engine.
lib/quickbeam.ex— public APIlib/quickbeam/runtime.ex— GenServer, handler dispatch, message looplib/quickbeam/server.ex— shared GenServer code for Runtime and Contextlib/quickbeam/quickbeam.zig— NIF entry pointslib/quickbeam/worker.zig— JS worker thread (eval, compile, call, DOM ops)lib/quickbeam/types.zig— message queue, payloads, reply helperslib/quickbeam/js_to_beam.zig/beam_to_js.zig— value conversionpriv/c_src/quickjs.c— QuickJS-NG engine (vendored, patched)priv/ts/— TypeScript polyfills (Web APIs, Node compat)
- Add the function in
quickbeam.zig(orworker.zigfor async ops) - Register it in
native.exundernifs: - If async: add a message variant to
types.zig, dispatch inworker.zig
- Bump
@versioninmix.exs - Update
CHANGELOG.md(rename "Unreleased" → version) - Set placeholder checksums in
checksum-QuickBEAM.Native.exs - Commit:
git commit -m "Release vX.Y.Z" - Tag and push:
git tag vX.Y.Z && git push && git push --tags - Wait for the precompile workflow (builds NIFs for linux-x64, macos-arm64)
- Download artifacts, compute checksums:
gh release download vX.Y.Z --dir /tmp/release for f in /tmp/release/*.tar.gz; do echo "{\"$(basename $f)\", \"sha256:$(shasum -a 256 $f | cut -d' ' -f1)\"}," done
- Update
checksum-QuickBEAM.Native.exswith real hashes - Commit and push:
git commit -am "Update precompiled NIF checksums for vX.Y.Z" && git push - Build docs locally to verify:
QUICKBEAM_BUILD=1 mix compile && mix docs(must build NIF from source — precompiled NIF causes OOM during doc generation) - Publish:
mix hex.publish(requires interactive terminal for auth)
Never force-push a release tag. The precompile workflow runs on tag push. Force-pushing re-triggers it, producing new artifacts with different checksums than what was already published to Hex. If you need to fix a release, publish a patch version instead.