ReviewOS

home-lang/home

Restore the Home-only -Denable_jsc=false build

#552
Closed chris opened this 10 days ago ·
10 days ago

Scope

The JSC-enabled runtime build is green, but the explicit -Denable_jsc=false debug configuration currently reaches the link step and reports roughly 1,557 undefined runtime/JSC, WebKit, OpenSSL, and uWebSockets symbols. This prevents validating the Home-only compiler configuration independently from the native Bun runtime.

This was observed while checking compiler dispatch for #550. The JS/TS path correctly reports that JavaScriptCore is disabled at source level, but the build graph still instantiates or retains native runtime symbols that are not linked in this configuration.

Acceptance criteria

  • zig build debug -Denable_jsc=false -j1 links successfully.
  • .home/.hm build and run commands continue to work in that binary.
  • JS/TS runtime and build commands return a concise JavaScriptCore-disabled diagnostic without unresolved symbols.
  • The non-JSC build does not compile or retain the full JSC/native binding graph.
  • Add a focused CI or build-graph check for this configuration.

Parent: #66 Discovered while completing: #550

10 days ago

Resolved on main by 5acfbe6ea.

The failure was caused by the Home-only executable semantically analyzing the full vendored Bun runtime even when -Denable_jsc=false. That retained generated JavaScriptCore/WebCore bindings and produced 1,557 unresolved native symbols at link time.

The fix adds a deliberately small home_rt_no_jsc CLI surface and selects it at compile time for Home-only builds. Runtime-only context, standalone graph, shell, stream-iterator, and package-manager paths are now compile-time isolated. Home-native commands remain available; supported package operations continue through Pantry; commands that truly require Bun's runtime return a direct JSC-disabled diagnostic.

Verification:

  • zig build debug -Denable_jsc=false -j1 ...: 5/5 steps succeeded
  • Home source smoke test: home-debug build examples/bitwise.home --outfile ... produced an executable, which returned the example's expected exit code 8
  • TypeScript build in Home-only mode: exits 1 with the concise JavaScriptCoreDisabled diagnostic
  • Link audit: the 9.7 MB Home-only executable links only SQLite/compression/system libraries; nm finds no JavaScriptCore, WebKit, or Bun runtime symbols
  • zig build debug -Denable_jsc=true -j1 ...: 18/18 steps succeeded
  • JSC TypeScript bundling smoke test: passed
  • scoped home_rt suite: 1,822 passed, 19 skipped, 0 failed (1,841 total)
  • scoped Pickier check and git diff --check: passed

Sign in to comment on this issue.