emscripten-core / emscripten-core/emscripten

Defining custom Module.instantiateWasm() causes -sWASMFS builds to die horribly

Open
#17,951 0 comments 0 reactions 0 assignees View on GitHub
wasmfs
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

**Version of emscripten/emsdk:**

```
$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.23 (5ae63ce7dd955df449cb419bfe5afc51d1bd57f2)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ uname -a
Linux nuc 5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```

i also tried version 3.1.21, with the same results. Browsers Chrome v105 and v107 were tried, with identical results.

**Failing command line in full:**

It's not quite that simple, unfortunately.

We have a large project (the upcoming official sqlite3 wasm build) for which we are trying to customize the WASM imports. Apparently the only way to do that with Emscripten is to provide a custom Module.instantiateWasm() and modify the imports object which gets passed to it.

Our custom loader works wonderfully in every build combination we've tried but dies horribly in an -sWASMFS build.

The loader:

```js
Module['instantiateWasm'] = function callee(imports,onSuccess){
imports.foo = function(){}; // the whole goal of these acrobatics is to be able to customize the imports
console.warn("instantiateWasm() uri =",callee.uri, self.location.href);
const wfetch = ()=>fetch(callee.uri, {credentials: 'same-origin'});
const loadWasm = WebAssembly.instantiateStreaming
? function loadWasmStreaming(){
return WebAssembly.instantiateStreaming(wfetch(), imports)
.then((arg)=>onSuccess(arg.instance, arg.module));
}
: function loadWasmOldSchool(){ // Safari < v15
return wfetch()
.then(response => response.arrayBuffer())
.then(bytes => WebAssembly.instantiate(bytes, imports))
.then((arg)=>onSuccess(arg.instance, arg.module));
};
loadWasm();
return {};
};
/*
It is literally impossible to reliably get the name of _this_ script
at runtime, so impossible to derive X.wasm from script name
X.js. Thus we need, at build-time, to redefine
Module['instantiateWasm'].uri by appending it to a build-specific
copy of this file with the name of the wasm file. This is apparently
why Emscripten hard-codes the name of the wasm file into their glue
scripts.
*/
Module['instantiateWasm'].uri = 'sqlite3-wasmfs.wasm';
```

That runs just fine until a build with -sWASMFS is used, at which point it dies during startup after triggering the loader several times (presumably once per worker thread):

```
sqlite3-wasmfs.worker.js:28 worker.js onmessage() captured an uncaught exception: TypeError: Cannot read properties of undefined (reading '_emscripten_thread_init')
threadPrintErr @ sqlite3-wasmfs.worker.js:28
self.onmessage @ sqlite3-wasmfs.worker.js:161
sqlite3-wasmfs.worker.js:28 TypeError: Cannot read properties of undefined (reading '_emscripten_thread_init')
at Object.__emscripten_thread_init (sqlite3-wasmfs.js:1021:13)
at self.onmessage (sqlite3-wasmfs.worker.js:97:41)
```

The failing line is:

```js
// Pass the thread address to wasm to store it for fast access.
Module['__emscripten_thread_init'](e.data.pthread_ptr, /*isMainBrowserThread=*/0, /*isMainRuntimeThread=*/0, /*canBlock=*/1);
```

**Full link command and output with `-v` appended:**

Hang on to your hat...

```
[stephan@nuc:~/f/s/lite/ext/wasm]$ make sqlite3-wasmfs.js
Development build. Use 'make release' for a smaller release build.
cat api/EXPORTED_FUNCTIONS.sqlite3-api jaccwabyt/jaccwabyt_test.exports > EXPORTED_FUNCTIONS.api
Making sqlite3-api.js...
Making post-js.js...
cp api/pre-js.js pre-js-sqlite3-wasmfs.js
echo "Module['instantiateWasm'].uri = 'sqlite3-wasmfs.wasm';" >> pre-js-sqlite3-wasmfs.js
Building sqlite3-wasmfs.js ...
/home/stephan/src/emsdk/upstream/emscripten/emcc -v -o sqlite3-wasmfs.js -O0 -g3 \
-std=c99 -fPIC -g -pthread -I. -I.. -I../.. -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_THREADSAFE=0 -DSQLITE_TEMP_STORE=3 -DSQLITE_OS_KV_OPTIONAL=1 '-DSQLITE_DEFAULT_UNIX_VFS="unix-none"' -DSQLITE_USE_URI=1 -DSQLITE_WASM_WASMFS -fPIC --no-entry --minify 0 -sMODULARIZE -sSTRICT_JS -sDYNAMIC_EXECUTION=0 -sNO_POLYFILL -sEXPORTED_FUNCTIONS=@/home/stephan/f/s/lite/ext/wasm/EXPORTED_FUNCTIONS.api -sEXPORTED_RUNTIME_METHODS=FS,wasmMemory,allocateUTF8OnStack -sUSE_CLOSURE_COMPILER=0 -sIMPORTED_MEMORY -sEXPORT_NAME=sqlite3InitModule -sGLOBAL_BASE=4096 -sALLOW_TABLE_GROWTH -Wno-limited-postlink-optimizations -sERROR_ON_UNDEFINED_SYMBOLS=0 -sLLD_REPORT_UNDEFINED -sMEMORY64=0 -sINITIAL_MEMORY=128450560 -pthread -sWASMFS -sPTHREAD_POOL_SIZE=2 -sENVIRONMENT=web,worker -sWASM_BIGINT=1 --post-js=post-js.js --extern-post-js=api/extern-post-js.js --extern-pre-js=api/extern-pre-js.js --pre-js=pre-js-sqlite3-wasmfs.js \
api/sqlite3-wasm.c jaccwabyt/jaccwabyt_test.c
"/home/stephan/src/emsdk/upstream/bin/clang" --version
"/home/stephan/src/emsdk/upstream/bin/clang" -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_SHARED_MEMORY__=1 -DEMSCRIPTEN -Werror=implicit-function-declaration -I/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/SDL --sysroot=/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -v -O0 -g3 -std=c99 -fPIC -g3 -pthread -I. -I.. -I../.. -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_THREADSAFE=0 -DSQLITE_TEMP_STORE=3 -DSQLITE_OS_KV_OPTIONAL=1 -DSQLITE_DEFAULT_UNIX_VFS="unix-none" -DSQLITE_USE_URI=1 -DSQLITE_WASM_WASMFS -fPIC -pthread -matomics -mbulk-memory api/sqlite3-wasm.c -c -o /tmp/stephan/emscripten_temp_w9o8qdgv/sqlite3-wasm_0.o
clang version 16.0.0 (https://github.com/llvm/llvm-project 8b587113b746f31b63fd6473083df78cef30a72e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/stephan/src/emsdk/upstream/bin
(in-process)
"/home/stephan/src/emsdk/upstream/bin/clang-16" -cc1 -triple wasm32-unknown-emscripten -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name sqlite3-wasm.c -mrelocation-model pic -pic-level 2 -mframe-pointer=none -ffp-contract=on -fno-rounding-math -mconstructor-aliases -target-feature +atomics -target-feature +bulk-memory -target-feature +mutable-globals -target-feature +sign-ext -target-feature +mutable-globals -target-cpu generic -target-feature +atomics -target-feature +bulk-memory -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/home/stephan/f/s/lite/ext/wasm -resource-dir /home/stephan/src/emsdk/upstream/lib/clang/16.0.0 -D __EMSCRIPTEN_SHARED_MEMORY__=1 -D EMSCRIPTEN -I /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/SDL -I . -I .. -I ../.. -D SQLITE_ENABLE_FTS4 -D SQLITE_ENABLE_RTREE -D SQLITE_ENABLE_EXPLAIN_COMMENTS -D SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -D SQLITE_ENABLE_STMTVTAB -D SQLITE_ENABLE_DBPAGE_VTAB -D SQLITE_ENABLE_DBSTAT_VTAB -D SQLITE_ENABLE_BYTECODE_VTAB -D SQLITE_ENABLE_OFFSET_SQL_FUNC -D SQLITE_OMIT_LOAD_EXTENSION -D SQLITE_OMIT_DEPRECATED -D SQLITE_OMIT_UTF16 -D SQLITE_OMIT_SHARED_CACHE -D SQLITE_THREADSAFE=0 -D SQLITE_TEMP_STORE=3 -D SQLITE_OS_KV_OPTIONAL=1 -D "SQLITE_DEFAULT_UNIX_VFS=\"unix-none\"" -D SQLITE_USE_URI=1 -D SQLITE_WASM_WASMFS -isysroot /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot -internal-isystem /home/stephan/src/emsdk/upstream/lib/clang/16.0.0/include -internal-isystem /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/wasm32-emscripten -internal-isystem /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include -O0 -Werror=implicit-function-declaration -std=c99 -fdebug-compilation-dir=/home/stephan/f/s/lite/ext/wasm -ferror-limit 19 -fvisibility=default -pthread -fgnuc-version=4.2.1 -fignore-exceptions -fcolor-diagnostics -iwithsysroot/include/compat -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -o /tmp/stephan/emscripten_temp_w9o8qdgv/sqlite3-wasm_0.o -x c api/sqlite3-wasm.c
clang -cc1 version 16.0.0 based upon LLVM 16.0.0git default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/wasm32-emscripten"
#include "..." search starts here:
#include <...> search starts here:
/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/SDL
.
..
../..
/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/compat
/home/stephan/src/emsdk/upstream/lib/clang/16.0.0/include
/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include
End of search list.
"/home/stephan/src/emsdk/upstream/bin/clang" -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_SHARED_MEMORY__=1 -DEMSCRIPTEN -Werror=implicit-function-declaration -I/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/SDL --sysroot=/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -v -O0 -g3 -std=c99 -fPIC -g3 -pthread -I. -I.. -I../.. -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_THREADSAFE=0 -DSQLITE_TEMP_STORE=3 -DSQLITE_OS_KV_OPTIONAL=1 -DSQLITE_DEFAULT_UNIX_VFS="unix-none" -DSQLITE_USE_URI=1 -DSQLITE_WASM_WASMFS -fPIC -pthread -matomics -mbulk-memory jaccwabyt/jaccwabyt_test.c -c -o /tmp/stephan/emscripten_temp_w9o8qdgv/jaccwabyt_test_1.o
clang version 16.0.0 (https://github.com/llvm/llvm-project 8b587113b746f31b63fd6473083df78cef30a72e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/stephan/src/emsdk/upstream/bin
(in-process)
"/home/stephan/src/emsdk/upstream/bin/clang-16" -cc1 -triple wasm32-unknown-emscripten -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name jaccwabyt_test.c -mrelocation-model pic -pic-level 2 -mframe-pointer=none -ffp-contract=on -fno-rounding-math -mconstructor-aliases -target-feature +atomics -target-feature +bulk-memory -target-feature +mutable-globals -target-feature +sign-ext -target-feature +mutable-globals -target-cpu generic -target-feature +atomics -target-feature +bulk-memory -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/home/stephan/f/s/lite/ext/wasm -resource-dir /home/stephan/src/emsdk/upstream/lib/clang/16.0.0 -D __EMSCRIPTEN_SHARED_MEMORY__=1 -D EMSCRIPTEN -I /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/SDL -I . -I .. -I ../.. -D SQLITE_ENABLE_FTS4 -D SQLITE_ENABLE_RTREE -D SQLITE_ENABLE_EXPLAIN_COMMENTS -D SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -D SQLITE_ENABLE_STMTVTAB -D SQLITE_ENABLE_DBPAGE_VTAB -D SQLITE_ENABLE_DBSTAT_VTAB -D SQLITE_ENABLE_BYTECODE_VTAB -D SQLITE_ENABLE_OFFSET_SQL_FUNC -D SQLITE_OMIT_LOAD_EXTENSION -D SQLITE_OMIT_DEPRECATED -D SQLITE_OMIT_UTF16 -D SQLITE_OMIT_SHARED_CACHE -D SQLITE_THREADSAFE=0 -D SQLITE_TEMP_STORE=3 -D SQLITE_OS_KV_OPTIONAL=1 -D "SQLITE_DEFAULT_UNIX_VFS=\"unix-none\"" -D SQLITE_USE_URI=1 -D SQLITE_WASM_WASMFS -isysroot /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot -internal-isystem /home/stephan/src/emsdk/upstream/lib/clang/16.0.0/include -internal-isystem /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/wasm32-emscripten -internal-isystem /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include -O0 -Werror=implicit-function-declaration -std=c99 -fdebug-compilation-dir=/home/stephan/f/s/lite/ext/wasm -ferror-limit 19 -fvisibility=default -pthread -fgnuc-version=4.2.1 -fignore-exceptions -fcolor-diagnostics -iwithsysroot/include/compat -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -o /tmp/stephan/emscripten_temp_w9o8qdgv/jaccwabyt_test_1.o -x c jaccwabyt/jaccwabyt_test.c
clang -cc1 version 16.0.0 based upon LLVM 16.0.0git default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/wasm32-emscripten"
#include "..." search starts here:
#include <...> search starts here:
/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/SDL
.
..
../..
/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include/compat
/home/stephan/src/emsdk/upstream/lib/clang/16.0.0/include
/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/include
End of search list.
"/home/stephan/src/emsdk/upstream/bin/wasm-ld" -o sqlite3-wasmfs.wasm /tmp/stephan/emscripten_temp_w9o8qdgv/sqlite3-wasm_0.o /tmp/stephan/emscripten_temp_w9o8qdgv/jaccwabyt_test_1.o -L/home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten /home/stephan/src/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/crtbegin.o --whole-archive -lwasmfs-mt-debug --no-whole-archive -lGL-mt -lal -lhtml5 -lstubs-debug -lnoexit -lc-mt-debug -ldlmalloc-mt -lcompiler_rt-mt -lc++-mt-noexcept -lc++abi-mt-noexcept -lsockets-mt -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --import-memory --shared-memory --export-if-defined=sqlite3_bind_blob --export-if-defined=sqlite3_bind_double --export-if-defined=sqlite3_bind_int --export-if-defined=sqlite3_bind_int64 --export-if-defined=sqlite3_bind_null --export-if-defined=sqlite3_bind_parameter_count --export-if-defined=sqlite3_bind_parameter_index --export-if-defined=sqlite3_bind_text --export-if-defined=sqlite3_changes --export-if-defined=sqlite3_changes64 --export-if-defined=sqlite3_clear_bindings --export-if-defined=sqlite3_close_v2 --export-if-defined=sqlite3_column_blob --export-if-defined=sqlite3_column_bytes --export-if-defined=sqlite3_column_count --export-if-defined=sqlite3_column_double --export-if-defined=sqlite3_column_int --export-if-defined=sqlite3_column_int64 --export-if-defined=sqlite3_column_name --export-if-defined=sqlite3_column_text --export-if-defined=sqlite3_column_type --export-if-defined=sqlite3_compileoption_get --export-if-defined=sqlite3_compileoption_used --export-if-defined=sqlite3_create_function_v2 --export-if-defined=sqlite3_data_count --export-if-defined=sqlite3_db_filename --export-if-defined=sqlite3_db_handle --export-if-defined=sqlite3_db_name --export-if-defined=sqlite3_errmsg --export-if-defined=sqlite3_error_offset --export-if-defined=sqlite3_errstr --export-if-defined=sqlite3_exec --export-if-defined=sqlite3_expanded_sql --export-if-defined=sqlite3_extended_errcode --export-if-defined=sqlite3_extended_result_codes --export-if-defined=sqlite3_file_control --export-if-defined=sqlite3_finalize --export-if-defined=sqlite3_initialize --export-if-defined=sqlite3_interrupt --export-if-defined=sqlite3_libversion --export-if-defined=sqlite3_libversion_number --export-if-defined=sqlite3_open --export-if-defined=sqlite3_open_v2 --export-if-defined=sqlite3_prepare_v2 --export-if-defined=sqlite3_prepare_v3 --export-if-defined=sqlite3_reset --export-if-defined=sqlite3_result_blob --export-if-defined=sqlite3_result_double --export-if-defined=sqlite3_result_error --export-if-defined=sqlite3_result_error_code --export-if-defined=sqlite3_result_error_nomem --export-if-defined=sqlite3_result_error_toobig --export-if-defined=sqlite3_result_int --export-if-defined=sqlite3_result_null --export-if-defined=sqlite3_result_text --export-if-defined=sqlite3_shutdown --export-if-defined=sqlite3_sourceid --export-if-defined=sqlite3_sql --export-if-defined=sqlite3_step --export-if-defined=sqlite3_strglob --export-if-defined=sqlite3_strlike --export-if-defined=sqlite3_total_changes --export-if-defined=sqlite3_total_changes64 --export-if-defined=sqlite3_uri_boolean --export-if-defined=sqlite3_uri_int64 --export-if-defined=sqlite3_uri_key --export-if-defined=sqlite3_uri_parameter --export-if-defined=sqlite3_value_blob --export-if-defined=sqlite3_value_bytes --export-if-defined=sqlite3_value_double --export-if-defined=sqlite3_value_text --export-if-defined=sqlite3_value_type --export-if-defined=sqlite3_vfs_find --export-if-defined=sqlite3_vfs_register --export-if-defined=malloc --export-if-defined=free --export-if-defined=jaccwabyt_test_intptr --export-if-defined=jaccwabyt_test_int64ptr --export-if-defined=jaccwabyt_test_int64_max --export-if-defined=jaccwabyt_test_int64_min --export-if-defined=jaccwabyt_test_int64_minmax --export-if-defined=jaccwabyt_test_int64_times2 --export-if-defined=jaccwabyt_test_struct --export-if-defined=jaccwabyt_test_ctype_json --export-if-defined=jaccwabyt_test_stack_overflow --export-if-defined=jaccwabyt_test_str_hello --export-if-defined=_emscripten_thread_init --export-if-defined=_emscripten_thread_exit --export-if-defined=_emscripten_thread_crashed --export-if-defined=_emscripten_tls_init --export-if-defined=pthread_self --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=fflush --export-if-defined=emscripten_stack_get_end --export-if-defined=emscripten_stack_get_free --export-if-defined=emscripten_stack_get_base --export-if-defined=emscripten_stack_init --export-if-defined=_wasmfs_read_file --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=__errno_location --export-if-defined=emscripten_dispatch_to_thread_ --export-if-defined=_emscripten_thread_free_data --export-if-defined=emscripten_main_browser_thread_id --export-if-defined=emscripten_main_thread_process_queued_calls --export-if-defined=emscripten_run_in_main_runtime_thread_js --export-if-defined=emscripten_stack_set_limits --export-if-defined=emscripten_proxy_finish --export-if-defined=malloc --export-if-defined=free --export-table --growable-table -z stack-size=5242880 --initial-memory=128450560 --no-entry --max-memory=128450560 --global-base=4096
"/home/stephan/src/emsdk/node/14.18.2_64bit/bin/node" /home/stephan/src/emsdk/upstream/emscripten/src/compiler.js /tmp/stephan/tmp4cqke1f7.json
"/home/stephan/src/emsdk/upstream/bin/llvm-objcopy" sqlite3-wasmfs.wasm sqlite3-wasmfs.wasm --remove-section=producers
"/home/stephan/src/emsdk/node/14.18.2_64bit/bin/node" /home/stephan/src/emsdk/upstream/emscripten/tools/preprocessor.js /tmp/stephan/emscripten_temp_w9o8qdgv/settings.js worker.js --expandMacros
chmod -x sqlite3-wasmfs.wasm
/home/stephan/bin/wasm-strip sqlite3-wasmfs.wasm
-rw-rw-r-- 1 stephan stephan 416554 Sep 29 23:14 sqlite3-wasmfs.js
-rw-rw-r-- 1 stephan stephan 2852278 Sep 29 23:14 sqlite3-wasmfs.wasm
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.