SpiderMonkey CYCLEBREAK bridge for bun_bundler.
bun_bundler is a pure-Rust bundler that uses CYCLEBREAK architecture:
it declares unsafe extern "Rust" symbols and link_interface! dispatch
vtables, but never names JSC types. The actual implementations are
provided by the engine layer (traditionally bun_jsc / bun_runtime).
This crate provides SpiderMonkey-backed implementations of those
CYCLEBREAK symbols and dispatch interfaces, replacing the JSC versions.
The bundler logic itself is 100% reused from bun_bundler.
CYCLEBREAK symbols provided
| Symbol | JSC implementation | SM implementation |
|---|---|---|
__bun_jsc_generate_cached_bytecode |
JSC bytecode cache | SM XDR encode (Phase 2) |
__bun_jsc_enable_hot_module_reloading_for_bundler |
JSC HMR watcher | bun_watcher + SM reload |
Dispatch interfaces provided
| Interface | Variant | Backing type |
|---|---|---|
VmLoaderCtx |
Runtime |
BaoVmLoaderCtx |
DevServerHandle |
Bake |
no-op (Phase 2: Bao bake) |