Skip to content

Delete all C and Rust: Track is .trk only, bootstrapped from a native seed - #40

Merged
dev-dami merged 8 commits into
mainfrom
agent/no-c-no-rust
Nov 22, 2026
Merged

dev-dami merged 8 commits into
mainfrom
agent/no-c-no-rust

Conversation

@dev-dami

Copy link
Copy Markdown
Owner

Removes every C and Rust file. 167 files, +1452 / −82,296.

  • Seed: the C seed (bootstrap/seed/trackc.c, 75.7k lines) is replaced by bootstrap/seed/trackc, a static native binary (1.26 MB). scripts/bootstrap.sh builds seed → stage1 → stage2 → stage3 and requires stage2 = stage3. No cc, as or ld runs (checked with strace).
  • C backend removed: cgen.trk, runtime_c.trk, runtime/ and emit-c are gone. Native is the only backend; --native and --rt=track are accepted no-ops.
  • Benchmarks: scratch/ (the C, Rust and Python benchmarks) is deleted, and bench/ is native only.
  • Native bug fixed: a non-folding const such as const S = "hi" printed 0. The goldens exposed it.
  • Tests: native only, 94 tests. The C backend's outputs are frozen as goldens. The ASan and C-vs-native comparisons are gone.
  • Platform: Track is now x86-64 Linux only. The docs, README, install.sh and site say so.

A local run from a clean clone bootstraps from the native seed with a fixed point, and tests/run.sh passes 94/94. Merged without waiting for CI, as asked.

🤖 Generated with Claude Code

dev-dami and others added 8 commits November 22, 2026 21:11
bench/ remains the Track benchmark harness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bootstrap/seed/trackc (static x86-64 ELF) replaces the C seed. bootstrap.sh
runs seed -> stage1 -> stage2 -> stage3 under env -i PATH=/nonexistent and
requires stage2 = stage3; update_seed.sh regenerates and checks the binary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Delete cgen.trk, runtime_c.trk, runtime/track_runtime.c and the C-runtime
embed script; embed_rt.sh becomes embed_runtime.sh. trackc build/run lower
to a static x86-64 ELF; emit-c is gone; --native and --rt=track are
accepted no-ops. The checker keeps the runtime arity table; ngen keeps its
temporary free code. Seed regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The C backend evaluated a non-folding const's expression at each use;
ngen emitted 0. Found by running the run_outputs goldens natively. Seed
regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop C-vs-native parity, emitted-C greps, ASan runs and --rt=track builds.
The C backend's outputs for tests/native, bench/progs and rt_smoke become
goldens in tests/cases/native_runs/. Executables are checked as static
ET_EXEC. backend_test keeps its checker assertions. ids.txt (94 tests) and
PORTING.md updated; yard builds without --native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bench/native.sh drops the C column and checks each program against its
tests/cases/native_runs golden. bench/race.sh (C-built vs native trackc)
and scripts/native_parity.sh (C vs native) go with the C backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bootstrap runs with only the POSIX tools bootstrap.sh needs on PATH; then
update_seed --check, deny-warnings, tests, yard, lsp, selfhost, and every
example built natively and compared with its golden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README, docs/bootstrap.md, docs/native.md, yard, SPEC, roadmap, CHANGELOG,
install.sh and the page install text: bootstrap from the committed native
seed, no C compiler, no emit-c, no C runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 114 files, which is 14 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

CodeRabbit couldn't verify your organization's usage billing state, so no usage-priced review was started. Retry after the billing service recovers.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9b0a8419-e86e-43ff-b377-ae25f716ef44
Commits

Reviewing files that changed from the base of the PR and between fc2c013 and 50c2273.

Files ignored due to path filters: 53

  • tests/cases/native_runs/accloop.out is excluded by !**/*.out
  • tests/cases/native_runs/array_flow.out is excluded by !**/*.out
  • tests/cases/native_runs/array_mix.out is excluded by !**/*.out
  • tests/cases/native_runs/bounds.out is excluded by !**/*.out
  • tests/cases/native_runs/bounds_hoist.out is excluded by !**/*.out
  • tests/cases/native_runs/charat_hot.out is excluded by !**/*.out
  • tests/cases/native_runs/cold_prims.out is excluded by !**/*.out
  • tests/cases/native_runs/coll_hoist.out is excluded by !**/*.out
  • tests/cases/native_runs/core.out is excluded by !**/*.out
  • tests/cases/native_runs/divmin_flush.out is excluded by !**/*.out
  • tests/cases/native_runs/divmin_mod_flush.out is excluded by !**/*.out
  • tests/cases/native_runs/divzero.out is excluded by !**/*.out
  • tests/cases/native_runs/divzero_flush.out is excluded by !**/*.out
  • tests/cases/native_runs/exit_flush.out is excluded by !**/*.out
  • tests/cases/native_runs/fib.out is excluded by !**/*.out
  • tests/cases/native_runs/for_in.out is excluded by !**/*.out
  • tests/cases/native_runs/free_deep.out is excluded by !**/*.out
  • tests/cases/native_runs/free_latch.out is excluded by !**/*.out
  • tests/cases/native_runs/free_reuse.out is excluded by !**/*.out
  • tests/cases/native_runs/free_tail.out is excluded by !**/*.out
  • tests/cases/native_runs/fwd_access.out is excluded by !**/*.out
  • tests/cases/native_runs/latch_loop.out is excluded by !**/*.out
  • tests/cases/native_runs/loop_arith.out is excluded by !**/*.out
  • tests/cases/native_runs/mask_test.out is excluded by !**/*.out
  • tests/cases/native_runs/mulconst.out is excluded by !**/*.out
  • tests/cases/native_runs/nomain.out is excluded by !**/*.out
  • tests/cases/native_runs/nomain_lib.out is excluded by !**/*.out
  • tests/cases/native_runs/optimize.out is excluded by !**/*.out
  • tests/cases/native_runs/regcall.out is excluded by !**/*.out
  • tests/cases/native_runs/retslot_alias.out is excluded by !**/*.out
  • tests/cases/native_runs/retslot_let.out is excluded by !**/*.out
  • tests/cases/native_runs/retslot_loop.out is excluded by !**/*.out
  • tests/cases/native_runs/retslot_many.out is excluded by !**/*.out
  • tests/cases/native_runs/retslot_rec.out is excluded by !**/*.out
  • tests/cases/native_runs/rt_alloc.out is excluded by !**/*.out
  • tests/cases/native_runs/rt_alloc_nz.out is excluded by !**/*.out
  • tests/cases/native_runs/rt_lcache.out is excluded by !**/*.out
  • tests/cases/native_runs/rt_memlimit.out is excluded by !**/*.out
  • tests/cases/native_runs/rt_memlimit_lcache.out is excluded by !**/*.out
  • tests/cases/native_runs/rt_memlimit_realloc.out is excluded by !**/*.out
  • tests/cases/native_runs/rt_smoke.out is excluded by !**/*.out
  • tests/cases/native_runs/sb_spare.out is excluded by !**/*.out
  • tests/cases/native_runs/sbpush.out is excluded by !**/*.out
  • tests/cases/native_runs/sieve.out is excluded by !**/*.out
  • tests/cases/native_runs/stack_array.out is excluded by !**/*.out
  • tests/cases/native_runs/stack_deep.out is excluded by !**/*.out
  • tests/cases/native_runs/stack_leaf.out is excluded by !**/*.out
  • tests/cases/native_runs/stack_tail.out is excluded by !**/*.out
  • tests/cases/native_runs/strings.out is excluded by !**/*.out
  • tests/cases/native_runs/strlit_eq.out is excluded by !**/*.out
  • tests/cases/native_runs/structs.out is excluded by !**/*.out
  • tests/cases/native_runs/tail_many.out is excluded by !**/*.out
  • tests/cases/native_runs/tokenize.out is excluded by !**/*.out
Files selected for processing: 114

  • .gitattributes
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • README.md
  • SPEC.md
  • bench/native.sh
  • bench/race.sh
  • bootstrap/seed/README.md
  • bootstrap/seed/trackc
  • bootstrap/seed/trackc.c
  • bootstrap/seed/trackc.rt.c
  • compiler/src/cgen.trk
  • compiler/src/checker.trk
  • compiler/src/main.trk
  • compiler/src/ngen.trk
  • compiler/src/runtime_c.trk
  • compiler/src/runtime_trk.trk
  • compiler/tests/backend_test.trk
  • docs/bootstrap.md
  • docs/lifecycles.md
  • docs/native.md
  • docs/roadmap.md
  • docs/yard.md
  • page/src/data/docsData.ts
  • page/src/data/roadmapData.ts
  • page/src/data/stdlibData.ts
  • page/src/pages/HomePage.tsx
  • runtime/track_runtime.c
  • scratch/benchmark.py
  • scratch/benchmark_results.md
  • scratch/benchmarks/branch.c
  • scratch/benchmarks/branch.py
  • scratch/benchmarks/branch.rs
  • scratch/benchmarks/branch.trk
  • scratch/benchmarks/loop.c
  • scratch/benchmarks/loop.py
  • scratch/benchmarks/loop.rs
  • scratch/benchmarks/loop.trk
  • scratch/benchmarks/rec.c
  • scratch/benchmarks/rec.py
  • scratch/benchmarks/rec.rs
  • scratch/benchmarks/rec.trk
  • scratch/benchmarks/tuple.c
  • scratch/benchmarks/tuple.py
  • scratch/benchmarks/tuple.rs
  • scratch/benchmarks/tuple.trk
  • scripts/bootstrap.sh
  • scripts/embed_rt.sh
  • scripts/embed_runtime.sh
  • scripts/install.sh
  • scripts/native_parity.sh
  • scripts/update_seed.sh
  • tests/PORTING.md
  • tests/cases/native_runs/accloop.code
  • tests/cases/native_runs/array_flow.code
  • tests/cases/native_runs/array_mix.code
  • tests/cases/native_runs/bounds.code
  • tests/cases/native_runs/bounds_hoist.code
  • tests/cases/native_runs/charat_hot.code
  • tests/cases/native_runs/cold_prims.code
  • tests/cases/native_runs/coll_hoist.code
  • tests/cases/native_runs/core.code
  • tests/cases/native_runs/divmin_flush.code
  • tests/cases/native_runs/divmin_mod_flush.code
  • tests/cases/native_runs/divzero.code
  • tests/cases/native_runs/divzero_flush.code
  • tests/cases/native_runs/exit_flush.code
  • tests/cases/native_runs/fib.code
  • tests/cases/native_runs/for_in.code
  • tests/cases/native_runs/free_deep.code
  • tests/cases/native_runs/free_latch.code
  • tests/cases/native_runs/free_reuse.code
  • tests/cases/native_runs/free_tail.code
  • tests/cases/native_runs/fwd_access.code
  • tests/cases/native_runs/latch_loop.code
  • tests/cases/native_runs/loop_arith.code
  • tests/cases/native_runs/mask_test.code
  • tests/cases/native_runs/mulconst.code
  • tests/cases/native_runs/nomain.code
  • tests/cases/native_runs/nomain_lib.code
  • tests/cases/native_runs/optimize.code
  • tests/cases/native_runs/regcall.code
  • tests/cases/native_runs/retslot_alias.code
  • tests/cases/native_runs/retslot_let.code
  • tests/cases/native_runs/retslot_loop.code
  • tests/cases/native_runs/retslot_many.code
  • tests/cases/native_runs/retslot_rec.code
  • tests/cases/native_runs/rt_alloc.code
  • tests/cases/native_runs/rt_alloc_nz.code
  • tests/cases/native_runs/rt_lcache.code
  • tests/cases/native_runs/rt_memlimit.code
  • tests/cases/native_runs/rt_memlimit_lcache.code
  • tests/cases/native_runs/rt_memlimit_realloc.code
  • tests/cases/native_runs/rt_smoke.code
  • tests/cases/native_runs/sb_spare.code
  • tests/cases/native_runs/sbpush.code
  • tests/cases/native_runs/sieve.code
  • tests/cases/native_runs/stack_array.code
  • tests/cases/native_runs/stack_deep.code
  • tests/cases/native_runs/stack_leaf.code
  • tests/cases/native_runs/stack_tail.code
  • tests/cases/native_runs/strings.code
  • tests/cases/native_runs/strlit_eq.code
  • tests/cases/native_runs/structs.code
  • tests/cases/native_runs/tail_many.code
  • tests/cases/native_runs/tokenize.code
  • tests/sh/ids.txt
  • tests/sh/lang.sh
  • tests/sh/lib.sh
  • tests/sh/lifecycle.sh
  • tests/sh/native.sh
  • tests/sh/selfhost.sh
  • tests/yard/run.sh
  • tools/yard/builder.trk

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dev-dami
dev-dami merged commit fed8a86 into main Nov 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant