Skip to content

Commit aac287a

Browse files
Fix ENOTCAPABLE on opening preopened dirs on browser
1 parent bf2be79 commit aac287a

File tree

1 file changed

+3
-0
lines changed
  • packages/npm-packages/ruby-wasm-wasi/src

1 file changed

+3
-0
lines changed

packages/npm-packages/ruby-wasm-wasi/src/browser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export const DefaultRubyVM = async (
4646
await vm.setInstance(instance);
4747

4848
wasi.setMemory(instance.exports.memory as WebAssembly.Memory);
49+
// Manually call `_initialize`, which is a part of reactor modoel ABI,
50+
// because the WASI polyfill doesn't support it yet.
51+
(instance.exports._initialize as Function)();
4952
vm.initialize();
5053

5154
return {

0 commit comments

Comments
 (0)