-
Notifications
You must be signed in to change notification settings - Fork 0
/
wasm.sh
executable file
·44 lines (40 loc) · 896 Bytes
/
wasm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
cp -r resources wasm
cd wasm
emcc \
-03 \
-Wall \
-std=c99 \
-Wunused-result \
-Wno-missing-braces \
-D_DEFAULT_SOURCE \
-sFULL-ES3=1 \
-sUSE_GLFW=3 \
-sASSERTIONS=1 \
-sMALLOC='dlmalloc' \
-sFORCE_FILESYSTEM=1 \
-sUSE_OFFSET_CONVERTER=1 \
-sGL_ENABLE_GET_PROC_ADDRESS \
-sEXPORTED_RUNTIME_METHODS=ccall \
-sEXPORTED_RUNTIME_METHODS=cwrap \
-sALLOW_MEMORY_GROWTH=1 \
-sSTACK_SIZE=1mb \
-sABORTING_MALLOC=0 \
-sASYNCIFY \
--emrun \
--embed-file resources@/resources \
../zig-out/lib/* \
-o \
slingshot.js
zip -r ../slingshot_wasm.zip .
# -sASYNCIFY \
# -sUSE_PTHREADS=1 \
# -sWASM=0 \
# --preload-file files/settings.json@/ \
# -sSAFE_HEAP=1 \
# -sASYNCIFY_STACK_SIZE=16777216 \
# -sINITIAL_MEMORY=128MB \
# -sTOTAL_MEMORY=512MB \
# -sALLOW_MEMORY_GROWTH=1 \
# -sSTACK_SIZE=512MB \
# -sINITIAL_MEMORY=1024MB \