ReviewOS

home-lang/home

refactor(build): retire the LLVM JS/TS launcher that copies `home` to /tmp and execs it

#790
Open chris opened this 8 days ago ·
8 days ago

Problem

The legacy --compile path produces a binary that, at every launch, writes the whole home executable plus the source into /tmp, forks, and execvs home run. That costs cold-start time, fails where /tmp is noexec, and leaks temp files when killed. Since babb9f9e2 JSC-enabled builds go through runNativeBuildCommand, so this path is only reachable in edge cases.

Evidence (origin/main @ d4b219507)

Scope

  • Remove js_entrypoint_llvm.zig and the command branch, or make it a hard error with a clear message.

Acceptance criteria

  • home build --compile has exactly one implementation.
  • No compiled artifact writes to /tmp at startup (test with a read-only / noexec tmp).

Part of #814.

8 days ago

Pushed 3a849f6ad directly to main (refactor(build): retire temporary LLVM launcher (#790)).

This removes the complete legacy launcher implementation and its codegen export: 636 lines deleted across exactly five files. The deleted path embedded the Home executable and JS/TS source, wrote both to /tmp/home-{runtime,entry}-XXXXXX at every launch, then forked and execvd home run. home build now has no secondary JS/TS branch in src/main.zig; JS/TS builds route only through the native runtime BuildCommand, while Home source continues through Home native codegen. Capability/parity docs now describe that boundary.

Verification on the pushed source:

  • source audit: zero remaining JSEntrypointLLVM, js_entrypoint_llvm, /tmp/home-runtime, /tmp/home-entry, mkstemps, or llvm-js- references outside the upstream mirror exclusion
  • codegen: 16/16
  • build CLI options: 7/7
  • full no-JSC CLI build: 26/26 steps, 2,783 MB guarded peak
  • zig fmt --check and git diff --check: pass

Leaving the issue open for the final acceptance exercise: run an exact-source JSC standalone artifact with a read-only/noexec temp directory. The obsolete implementation itself is gone; no live JSC/noexec result is being claimed here.

Sign in to comment on this issue.