Thanks for helping improve gengo.
- Keep changes focused and small.
- Add or update spec cases in
tests/spec/for behavior changes. - Prefer explicit runtime errors over implicit behavior.
Six presets are available: 256k (constrained), 1m (default), 16m (large), unlimited, dev, and stress.
Pass -Dpreset=<name> to any zig build command. For any change that touches the runtime, heap, or VM also run with GC stress enabled:
zig build -Dpreset=1m -Dgc_stress=true test-Dgc_stress=true forces a GC on every allocation — the harshest check for unrooted-value bugs.
The WASM test and benchmark targets require Wasmtime on PATH. For a local
installation elsewhere, pass -Dwasmtime=/path/to/wasmtime to zig build.
The Make targets accept the same override as
make test WASMTIME=/path/to/wasmtime.
They also require Binaryen's wasm-opt, which is used to build the explicit
optimised test artifact at build/test/gengo-cli.wasm.
Run these before opening a PR:
make wasi
make testmake uses the dev preset. Its runtime limits currently match 1m; use an
explicit zig build -Dpreset=<name> command when validating a specific preset.
For runtime, heap, or VM changes also run:
zig build -Dpreset=1m -Dgc_stress=true testIf relevant, also run:
make benchBuild the timing binary and profile with DWARF call graphs:
zig build -Dpreset=1m cli-fast
perf record --call-graph dwarf -F 999 -- ./zig-out/bin/gengo-fast tests/bench/007_dispatch_loop.gengo
perf reportDo not trust call-graph percentages from plain perf record -g on the
ReleaseFast binary: frame-pointer unwinding misattributes inlined frames
(e.g. allocation helpers showing up hot inside functions that never
allocate). --call-graph dwarf resolves inline frames correctly.
For per-opcode counters and allocation stats, build with -Dperf=true and
check std.core.gc_stats_ext() from scripts (alloc_object_calls,
gc_runs, gc_time_ns). Timing baselines for the benchmark set live in
tests/bench/time_baseline.txt.
The public docs site is sourced from docs/ and built by Gengoscript itself
(tools/site-builder/site-builder.gengo). CI rebuilds and deploys it on every
push that touches docs/, the site builder, or the engine.
Build the static site locally:
zig build -Dpreset=1m cli
./zig-out/bin/gengo --heap 4m --cap fs --mount root=. tools/site-builder/site-builder.gengoPreview it:
python3 -m http.server -d build/site 8001Notes:
dev-docs/andarchive/are repo documentation, not part of the published docs site.docs/changelog.mdis currently a site page that points to the canonical rootCHANGELOG.md.- Page reading order is the
chapterOrderlist at the top of the site builder; new pages land at the end until added there.
- One logical change per commit.
- Message format:
<type>: <short description>— e.g.fix: ...,feat: ...,build: ...,docs: .... - Do not include AI tool attribution in commit messages.
- Describe what changed and why.
- Mention user-visible behavior changes.
- Include any new/updated spec cases.
- The canonical version string is in
build.zig(gengo_version).sdk/typescript/package.jsonis kept in sync with it at all times. - Tag every breaking change. Tags follow
v<major>.<minor>.<patch>(e.g.,v0.4.0). CHANGELOG.mdentries under the new version's date go into the tag message.
The version string is never ambiguous about whether a build is a release:
- The first commit after a release bumps
gengo_versionto the next version with a-devsuffix (e.g.0.5.0-dev). Binaries built from main during a cycle always identify as pre-release. - When the cycle is done, a release commit drops the
-devsuffix and adds the version'sCHANGELOG.mdentries. - The annotated tag (
v0.5.0) goes on that release commit, and a GitHub release is published from it. - The next commit starts over at step 1.
A tagged commit is therefore the only place a bare version string exists.