ziglang/zig
How to contribute
The canonical project home has moved to Codeberg. The flow described here is what is reproducible from this repository's
build.zig,ci/scripts, and.forgejo/workflows/ci.yaml. Coordinate with the upstream project for where to file pull requests.
The day-to-day loop for a contributor working in this codebase is small:
- Pick a change.
- Write code in
src/,lib/, ortest/. - Run the relevant test slice with
zig build test-.... - Run
zig build test-fmt. - Run
zig build(a full build) before submitting. - Push to your fork (on whichever forge), open a merge/pull request, and wait for the CI matrix to run all targets in
.forgejo/workflows/ci.yaml.
The matrix is wide: aarch64-linux, aarch64-macos, loongarch64-linux, riscv64-linux, s390x-linux, x86_64-freebsd, x86_64-linux (with and without LLVM), x86_64-windows, aarch64-windows. Each runs both Debug and Release passes via ci/<target>-<mode>.{sh,ps1} and the timeouts in the workflow file are intentionally generous (some take 8+ hours).
Sub-pages
- Development workflow — branch, build, push.
- Testing — the test build steps and which one to run when.
- Debugging — logs, GDB/LLDB pretty-printers, crash reports,
incr-check. - Patterns and conventions — code style, error handling, naming.
- Tooling — generators, formatters, and maintenance scripts under
tools/.
Definition of done
A change is generally ready when:
zig build testpasses locally on at least one target you actually use.zig build test-fmtis clean.zig build docs(or at leastzig build langref) succeeds if the change touches the language or the build system.- For new behavior, a corresponding test exists under
test/behavior/,test/standalone/,test/cases/, or anothertest/subtree. - For compile errors, a snippet in
test/cases/compile_errors/(or another targeted subtree) covers the new diagnostic. - For linker changes, a test in
test/link/covers it.
Where to find people
The per-page Active contributors byline on each domain page (e.g. on Compiler architecture) is derived from git log and shows recent committers for that subsystem. There is no CODEOWNERS file in this repository.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.