Open-Source Wikis

/

Zig

/

How to contribute

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:

  1. Pick a change.
  2. Write code in src/, lib/, or test/.
  3. Run the relevant test slice with zig build test-....
  4. Run zig build test-fmt.
  5. Run zig build (a full build) before submitting.
  6. 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

Definition of done

A change is generally ready when:

  • zig build test passes locally on at least one target you actually use.
  • zig build test-fmt is clean.
  • zig build docs (or at least zig 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 another test/ 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.

How to contribute – Zig wiki | Factory