Commit bfa60a9e authored by Jordi Coscolla's avatar Jordi Coscolla Committed by Jaromil
Browse files

FIX limitation of 4k when using javascript version

parent 4d5c6839
# TODO: improve flags according to
# https://github.com/kripken/emscripten/blob/master/src/settings.js
javascript-node: cflags += -DARCH_JS -D'ARCH=\"JS\"' --memory-init-file 1
javascript-node: cflags += -DARCH_JS -D'ARCH=\"JS\"' -D MAX_STRING=128000 --memory-init-file 1
javascript-node: ldflags += --memory-init-file 1 -s WASM=0
javascript-node: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
......@@ -9,7 +9,7 @@ javascript-node: apply-patches lua53 milagro lpeglabel
@cp -v src/zenroom.js build/nodejs/
@cp -v src/zenroom.js.mem build/nodejs/
javascript-rn: cflags += -DARCH_JS -D'ARCH=\"JS\"' --memory-init-file 0
javascript-rn: cflags += -DARCH_JS -D'ARCH=\"JS\"' --memory-init-file 0 -D MAX_STRING=128000
javascript-rn: ldflags += -s WASM=0 --memory-init-file 0 -s MEM_INIT_METHOD=0 -s ASSERTIONS=1 -s NO_EXIT_RUNTIME=0 -s LEGACY_VM_SUPPORT=1 -s MODULARIZE=1
javascript-rn: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
......@@ -24,7 +24,7 @@ javascript-rn: apply-patches lua53 milagro lpeglabel
sed -i 's/;ENVIRONMENT_IS_WEB=[^;]*;/;ENVIRONMENT_IS_WEB=false;/g' src/zenroom.js
@cp -v src/zenroom.js build/rnjs/
javascript-wasm: cflags += -DARCH_WASM -D'ARCH=\"WASM\"'
javascript-wasm: cflags += -DARCH_WASM -D'ARCH=\"WASM\"' -D MAX_STRING=128000
javascript-wasm: ldflags += -s WASM=1 -s MODULARIZE=1
javascript-wasm: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
......@@ -39,4 +39,3 @@ javascript-demo: ldflags += -s WASM=1 -s ASSERTIONS=1 --shell-file ${extras}/she
javascript-demo: apply-patches lua53 milagro lpeglabel
CC=${gcc} CFLAGS="${cflags}" LDFLAGS="${ldflags}" LDADD="${ldadd}" \
make -C src js-demo
......@@ -84,7 +84,9 @@ void zen_teardown(zenroom_t *zenroom);
#define UMM_HEAP (64*1024) // 64KiB (masked with 0x7fff)
#define MAX_FILE (64*1024) // load max 64KiB files
#ifndef MAX_STRING
#define MAX_STRING 4097 // max 4KiB strings
#endif
#define MAX_OCTET 2049 // max 2KiB octets
#define LUA_BASELIBNAME "_G"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment