Skip to content

Commit 5490680

Browse files
Remove RUBY_FIBER_MACHINE_STACK_SIZE workaround
1 parent 1fed709 commit 5490680

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,7 @@ export const DefaultRubyVM = async (
7070
}> => {
7171
await init();
7272

73-
const wasi = new WASI({
74-
env: {
75-
// FIXME(katei): setjmp consumes a LOT of stack now, so we extend
76-
// default Fiber stack size as well as main stack size allocated
77-
// by wasm-ld's --stack-size. The ideal solution is to reduce
78-
// stack consumption in setjmp.
79-
RUBY_FIBER_MACHINE_STACK_SIZE: "16777216",
80-
},
81-
});
73+
const wasi = new WASI({});
8274
const vm = new RubyVM();
8375

8476
const imports = wasi.getImports(rubyModule) as WebAssembly.Imports;

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@ import { WASI } from "wasi";
22
import { RubyVM } from "./index";
33

44
export const DefaultRubyVM = async (rubyModule: WebAssembly.Module) => {
5-
const wasi = new WASI({
6-
env: {
7-
// FIXME(katei): setjmp consumes a LOT of stack now, so we extend
8-
// default Fiber stack size as well as main stack size allocated
9-
// by wasm-ld's --stack-size. The ideal solution is to reduce
10-
// stack consumption in setjmp.
11-
RUBY_FIBER_MACHINE_STACK_SIZE: "16777216",
12-
},
13-
});
5+
const wasi = new WASI();
146
const vm = new RubyVM();
157
const imports = {
168
wasi_snapshot_preview1: wasi.wasiImport,

0 commit comments

Comments
 (0)