Files
rose-ash/hosts/ocaml
giles cb7bbc9557 Bytecode module compiler: loadModule/compileModule APIs + build script
- sx_browser.ml: add api_load_module (execute pre-compiled bytecode on VM,
  copy defines back to env) and api_compile_module (compile SX source to
  bytecode via compile-module function)
- compile-modules.js: Node.js build tool that loads the js_of_ocaml kernel,
  compiles all 23 .sx platform files to bytecode, writes .sxbc.json files
- Serialization format: type-tagged JSON constants (s/n/b/nil/sym/kw/list/code)
  with nested code objects for lambda closures

All 23 files compile successfully (430K total bytecode JSON).
Next: wire up sx-platform.js to load bytecode instead of source.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 17:37:26 +00:00
..