From f50c11e54a94f7f872d936726e0ec6a4b7915d99 Mon Sep 17 00:00:00 2001 From: Cheng Shao Date: Fri, 15 Nov 2024 22:17:30 +0000 Subject: [PATCH] Apply -H64m to GHCRTS --- frontend/build.sh | 2 +- frontend/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/build.sh b/frontend/build.sh index 19d47cb..7ba79fe 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}`)),