runtime: implement WebAssembly/ESM integration for .wasm imports - #35587
Open
robobun wants to merge 9 commits into
Open
runtime: implement WebAssembly/ESM integration for .wasm imports#35587robobun wants to merge 9 commits into
robobun wants to merge 9 commits into
Claude / Claude Code Review
completed
Jul 25, 2026 in 31m 49s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/jsc_hooks.rs:4311-4314 |
is_commonjs_require wasm→file demotion missing from transpile_virtual_module sibling entry |
Annotations
Check warning on line 4314 in src/runtime/jsc_hooks.rs
claude / Claude Code Review
is_commonjs_require wasm→file demotion missing from transpile_virtual_module sibling entry
This CJS-only demotion enforces "WebAssembly/ESM integration is ESM-only" for filesystem paths, but the sibling entry `transpile_virtual_module` (jsc_hooks.rs:4601+) has no `is_commonjs_require` parameter — so `require('virtual-add.wasm')` on a `Bun.plugin` `b.module()` reaches the new `SyntheticModuleType::Wasm` branch in `handleVirtualModuleResult` (ModuleLoader.cpp:417-421) via `fetchCommonJSModule` and attempts wasm ESM instantiation through `provideFetch`+`drainSynchronousModuleQueue` inste
Loading