Skip to content

Commit

Permalink
adjust memory setting for wasm, hoping to run it on mobile.
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Aug 21, 2024
1 parent 37a0738 commit b21e201
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ if (EMSCRIPTEN)
endif()

# TODO: Adjust memory size.
set_target_properties(${BUILD_TARGET} PROPERTIES LINK_FLAGS "-s INITIAL_MEMORY=32MB -s TOTAL_MEMORY=256MB -sTOTAL_STACK=32MB -sASSERTIONS -s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -sMODULARIZE -sEXPORT_ES6=1 --bind")
# 4MB stack
set_target_properties(${BUILD_TARGET} PROPERTIES LINK_FLAGS "-sENVIRONMENT='web,worker' -sSTACK_SIZE=4000000 -sASSERTIONS -s ALLOW_MEMORY_GROWTH=1 -sMODULARIZE=1 -sEXPORT_ES6 -sINVOKE_RUN=0 --bind")

# ENVIRONMENT=web
# SINGLE_FILE=1

0 comments on commit b21e201

Please sign in to comment.