diff --git a/frontend/build.sh b/frontend/build.sh index 5bac142..e919d26 100755 --- a/frontend/build.sh +++ b/frontend/build.sh @@ -37,7 +37,7 @@ hs_wasm_path=$(find .. -name "*.wasm") if $dev_mode; then cp "$hs_wasm_path" dist/bin.wasm else - wizer --allow-wasi --wasm-bulk-memory true --init-func _initialize -o dist/bin.wasm "$hs_wasm_path" + env -i GHCRTS=-H64m "$(type -P wizer)" --allow-wasi --wasm-bulk-memory true --inherit-env true --init-func _initialize -o dist/bin.wasm "$hs_wasm_path" wasm-opt ${1+"$@"} dist/bin.wasm -o dist/bin.wasm wasm-tools strip -o dist/bin.wasm dist/bin.wasm fi diff --git a/frontend/index.js b/frontend/index.js index 1d5605b..45bd70c 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -2,7 +2,7 @@ import { WASI, OpenFile, File, ConsoleStdout } from "https://cdn.jsdelivr.net/np import ghc_wasm_jsffi from "./ghc_wasm_jsffi.js"; const args = []; -const env = []; +const env = ["GHCRTS=-H64m"]; const fds = [ new OpenFile(new File([])), // stdin ConsoleStdout.lineBuffered((msg) => console.log(`[WASI stdout] ${msg}`)),