Thanks for considering a contribution. zopa is small enough that nothing here should surprise you.
- Open an issue first if the change is non-trivial. It's faster than rewriting a PR after maintainer feedback.
- For typo fixes, comment polish, or one-line bug fixes, just open the PR.
You need Zig 0.16.0, Node 22+, and Python 3.12+.
zig build # builds zig-out/bin/zopa.wasm
zig build test # runs the Node integration suiteFor the optional wasmtime suite:
python3 -m venv .venv-test
.venv-test/bin/pip install -r test/requirements.txt
zig build test-wasmtimeFor the optional Envoy end-to-end check (requires brew install envoy
or equivalent, with the wamr runtime built in):
zig build test-envoyzig build test-all runs every suite that's available on the host.
zig fmt src test build.zig build.zig.zonbefore committing.- Public functions get a one-line doc comment that says why the function exists, not what it does. Don't restate the signature.
- Comments explain non-obvious memory ownership, lifetime, or invariants. If a comment doesn't add information beyond the code, remove it.
Conventional Commits style: feat(scope): summary,
fix(scope): summary, chore: summary, docs: summary. Keep the
subject under 72 characters. Body wraps at 80.
One commit per logical change. Don't mix refactors with behavior changes.
Sign every commit with git commit -s. The Developer Certificate of
Origin appends a Signed-off-by: trailer. CI rejects commits without
it.
- Rebase onto
mainbefore opening the PR. - Include test coverage for behavior changes. The integration suites
in
test/are the right place for most additions. - Update
CHANGELOG.mdunder the Unreleased section.
Contributions are accepted under Apache 2.0.