Contributing
Thank you for helping. Bug reports, ideas and pull requests are all welcome.
Reporting a bug or suggesting an idea
Open an issue and pick Bug or Idea. For a security problem, follow SECURITY.md instead.
Building
You need Zig 0.17 and git. libgit2 and SDL
are built along with Zit.
zig build # zig-out/bin/zitzig build run -- /path/to/a/repositoryMore options (release builds, cross-compiling, a system libgit2) are in docs/ARCHITECTURE.md.
Testing
SDL_VIDEODRIVER=dummy zig build testSDL_VIDEODRIVER=dummy zig build test -Dtest-filter="part of a test name"The dummy video driver lets the interface tests run without a display. Please add a test with every fix and feature: the smallest one that fails without your change.
If your change touches memory or speed, measure it as described in docs/PERF.md.
The website
The site at damienmonchaty.github.io/zit
is in site/, built with Astro Starlight; it needs Node 22.23 or later.
cd site && npm installnpm run dev # http://localhost:4321/zit/Its pages are in site/src/content/docs/. The changelog, this guide and the
privacy and security policies are shown there as they are written here, so
they are edited in one place. The site is published from main, with each
release.
Branches and pull requests
developis where work happens. Branch from it, and open your pull request againstdevelop.mainholds what is released. It only changes through a pull request fromdevelop, and each merge intomainbecomes a release.
Keep a pull request to one change, describe what it does and how you tested it, and match the style of the code around it.
Releasing
- On
develop, check the ceilings in docs/PERF.md the way its Method measures them, and write down what moved:scripts/measure.shon a copy of a repository of a few thousand commits: RSS, peak RSS, Private_Dirty and idle CPU, each under its ceiling — the script fails when one is over;zig build benchagainst the last release’s numbers,--vs;- a Debug build (
-Doptimize=debug) used for a minute on a real repository: its stack traces and its leak report at exit reach what the tests do not.
- Set the new version in
build.zig.zon(the app reads it from there) and inassets/zit.manifest(as0.1.2.0), and add its section toCHANGELOG.md. - Merge
developintomainthrough a pull request. - Tag the merge and push the tag:
The Release workflow builds Windows and Linux, writes
Terminal window git switch main && git pullgit tag v0.1.2 && git push origin v0.1.2SHA256SUMSand publishes the release with that version’s changelog.
Every push and pull request runs the CI workflow: the Linux build and
the whole test suite; the suite again built ReleaseFast, without the
safety checks — undefined behaviour ReleaseSafe traps on runs on there and
shows as a wrong answer or a crash; and the Windows build. main only
accepts a pull request once they pass.
License
By contributing, you agree that your contribution is licensed under the MIT License.