jolt/docs
Dmitri Sotnikov bffb492c1c
cgen: build-time AOT — native fns without a toolchain on the target (jolt-a7ds) (#148)
Splits native codegen into a build phase (needs cc) and a deploy phase (none):

- gen-c-module/compile-module compile MANY numeric-leaf fns into ONE native
  module (the AOT shape), generalizing the one-fn-per-.so JIT path.
- Backend :cgen-collect? records each numeric-leaf defn's IR while the app loads
  as bytecode; cgen/aot-build compiles them into one module and write-manifest
  persists {sopath, [{ns name sym}]}.
- Backend :cgen-prebuilt + cgen/load-aot: the deploy run loads the prebuilt .so
  (via the native builtin, no cc) and installs each cfunction as the var root
  with the same timing as the JIT path, so callers direct-link to native code.
- toolchain-available? no longer crashes when cc is off PATH (os/execute raises
  on a missing exe) — a toolchain-less target now gets false.

Proven end-to-end in two processes (spike/native/aot-demo.janet): build with cc,
then deploy with cc removed from PATH -> count-point still native, mandelbrot
3288753 at 12.4ms (full 18x). Test: test/integration/cgen-aot-test.janet. Default
path unchanged; the modes are opt-in. Gate green (118 files).

Remaining for a literal single binary: fuse the .so + manifest into the jpm exe.

Co-authored-by: Yogthos <yogthos@gmail.com>
2026-06-16 18:09:22 +00:00
..
rfc Fix -m arg drop under whole-program cache (jolt-4mui) + RFC 0003 sync (#138) 2026-06-16 13:34:08 +00:00
spec Library ports: get hiccup running, verify malli (reader + interop fixes) (#127) 2026-06-15 19:36:13 +00:00
architecture-refactor-plan.md Architecture refactor: plan + phase 0 (dead code + bugs) (#106) 2026-06-15 03:01:55 +00:00
building-and-deps.md Fold jolt-deps into the jolt binary (#133) 2026-06-16 10:30:28 +08:00
foundational-runtime-handoff.md Spike: localize the mandelbrot 15x floor (jolt-5vsp) (#143) 2026-06-16 16:20:40 +00:00
foundational-runtime-lever1-native-codegen.md cgen: build-time AOT — native fns without a toolchain on the target (jolt-a7ds) (#148) 2026-06-16 18:09:22 +00:00
foundational-runtime-spike-results.md Spike: localize the mandelbrot 15x floor (jolt-5vsp) (#143) 2026-06-16 16:20:40 +00:00
grammar.ebnf Protocol/interop fixes to run metosin/malli (jolt-ltwk) (#105) 2026-06-15 03:20:33 +00:00
libraries.md docs: note malli, markdown-clj, hiccup in libraries.md (#128) 2026-06-15 20:21:25 +00:00
seed-overlay-registry.md Refactor phase 5d/5e: seed↔overlay registry + rep↔API boundary docs (jolt-bvek) 2026-06-15 04:22:05 -04:00
self-hosting-architecture.md docs: consolidate doc/ into docs/ 2026-06-10 12:10:28 -04:00
self-hosting-compiler.md Direct-link + whole-program by default for program runs; open for the REPL 2026-06-14 15:44:01 -04:00
tools-deps.md Fold jolt-deps into the jolt binary (#133) 2026-06-16 10:30:28 +08:00