Closed gottfriedleibniz closed 1 year ago
Apparently lua limits the stack to 1MB by default. Things should run great if we limit at the same value on emscripten.
In luatests.mjs, if you enable _port, e.g., lua.global.set('_port', true)
, it will disable all non-portable tests. This allows you to remove main.lua, strings.lua, and files.lua from disabledtests.
literals.lua includes some locale tests for pt_BR
and ptb
. However, musl treats invalid/unusable locales as aliases to C.UTF-8, causing os.setlocale
to always return true (regardless of validity).
I suppose you could patch that by replacing os.setlocale
with a function to always return false.
Following up on https://github.com/ceifa/wasmoon/pull/72, the current build script does not set
STACK_SIZE
(Emscripten) or reduceLUAI_MAXCCALLS
(Lua) to deal with emscripten reducing the default stack size. For example, using a test from the Lua repository (cstack.lua):Results in:
Building with
-s STACK_SIZE=1MB
(value pulled from Windows) or-DLUAI_MAXCCALLS=120
fixes the above.