Skip to content

WebAssembly in jitless mode — interest in a DrumBrake-enabled switch-v8 variant? #411

Description

@natureglass

I am working on an nx.js-based runtime and do most day-to-day iteration under Citron, where JIT is unavailable, so V8 runs --jitless — and jitless V8 has no WebAssembly at all. V8 ships an in-tree wasm interpreter for exactly this case (DrumBrake, v8_enable_drumbrake + --wasm-jitless), but the current switch-v8 package is built without it.

What I tried

I built a switch-v8 15.0.243-10 variant with v8_enable_drumbrake=true. Upstream's support matrix (gni/v8.gni: is_drumbrake_supported) excludes horizon and requires pointer compression, so it needed two minimal patches:

  • 0010 — add target_os == "horizon" to the whitelist, drop the pointer-compression conjunct (clearly marked EXPERIMENTAL / upstream-unblessed)
  • 0011 — the one PC-off static_assert in s2s_RefArrayFill converted to a loud FATAL, mirroring upstream's own CHECK(false) pattern on the ref-return path

Results:

  • ✅ Builds clean in your CI container; DrumBrake symbols present in the monolith (~+940 KiB NRO, ~+3.4 MiB package)
  • ❌ Under Citron, the isolate hangs inside Isolate::New() even with --wasm-jitless NOT passed — merely compiling DrumBrake in breaks boot there. Localized with traces; no explicit DrumBrake branch on that path in isolate.cc / wasm-engine.cc, so it's an implicit effect (snapshot/builtins layout suspected).
  • ⚠️ This is Citron-only evidence, not a Horizon verdict. Applet-mode DrumBrake on real hardware may work fine; I deprioritized that verification since my own goal was the Citron dev loop.

Branch with the patches + PKGBUILD: https://github.com/natureglass/pacman-packages/tree/drumbrake-enable — happy to share the built artifact, full logs, and the trace diffs.

Questions

  1. Do you have any plans for wasm support in jitless contexts?
  2. Would an opt-in experimental package variant (or just a documented build flag) be something you'd consider?
  3. Any insight into the Isolate::New hang is welcome.

The durable fix is upstream V8 widening is_drumbrake_supported, which is neither of ours to own — filing this mainly to sync on direction and leave the findings somewhere findable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions