Skip to content

Contributing

StefanVonRanda edited this page Aug 4, 2026 · 3 revisions

Contributing

Thanks for trying Tycho and wanting to help. Tycho is an experimental proof-of-concept, so the most useful thing you can send right now is a bug report, a repro, or some design feedback — much more than a big feature. Please don't be shy about filing an issue.

Reporting bugs and giving feedback

  • Found a miscompile, crash, or wrong output? Open a bug report with the single most useful thing: a small .ty program that reproduces it, plus what you expected vs. what happened, and your OS.
  • Have an idea, a rough edge, or a "why does it work this way?" Open an idea/feedback issue. Even "I bounced off X" tells the author something useful.
  • A miscompile that a fixture in tests/ would have caught is gold — it shows where the fuzzer and suite have a blind spot.

Building and running

All you need is a C compiler (cc) and make — see Installing Tycho.

make                 # build ./tychoc
./tychoc f.ty && ./f  # compile + run a program

The local gate (run it before a PR)

Tycho has no cloud CI — that's on purpose. The gate is scripts/ci.sh, run locally:

make ci              # build · test · ilp32 · asan-self · corelib + examples ·
                     # concurrency · FFI · the three fuzz lanes · tooling ·
                     # perf guard · recursion · spec-check · link+citation check
make ci N=0          # same, skipping the (slow) fuzz lanes for a quick check

A change is "green" iff make ci passes. You can also install the local pre-push hook (make hooks), which runs make ci N=0 plus a fuzz smoke and blocks the push if either fails.

Two rules that will surprise you

  1. There is one maintained compiler, and compiler/tychoc0.ty is not it. src/tychoc.c (tychoc) is the reference transpiler; the spec is normative. compiler/tychoc0.ty is the frozen artifact that proved self-hosting (compiled by itself, it reproduced its own emitted C byte-for-byte). It was frozen on 2026-07-26 — do not update it, do not mirror a language change into it, and do not read it to learn how Tycho behaves.

  2. The arena memory model is the whole point. Value semantics + implicit per-scope arenas (no GC, no manual free) is the thesis. Changes that quietly break the in-place optimizations (string append, the map accumulator, move-on-last-use) turn an O(n) idiom into O(n²), and make bench guards against that.

Code style

  • Match the surrounding code — its comment density, naming, and idioms.
  • One focused change per commit; the commit message says what was wrong and how the fix was verified (which test / gate / fuzz run).
  • New behavior gets a regression test under tests/ (or a corelib/test/ fixture) with a recorded golden, so it can't silently regress.

Submitting

Open a pull request against main. Confirm make ci is green locally and say so in the PR. Small, well-scoped PRs with a test are the easiest to accept.

By contributing, you agree your contributions are licensed under the project's MIT License.

Clone this wiki locally