File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -816,8 +816,9 @@ Now emnapi has 3 implementations of async work and 2 implementations of TSFN:
816816There are some limitations on browser about wasi-libc's pthread implementation, for example
817817` pthread_mutex_lock ` may call ` __builtin_wasm_memory_atomic_wait32 ` ( ` memory .atomic .wait32 ` )
818818which is disallowed in browser JS main thread. While Emscripten's pthread implementation
819- has considered usage in browser. If you need to run your addon with multithreaded features on browser,
820- we recommend you use Emscripten A & D, or bare wasm32 C & E.
819+ has considered usage in browser. This issue can be solved by upgrading ` wasi -sdk ` to v26+
820+ and emnapi v1.5.0+ then pass ` --export =emnapi_thread_crashed ` to the linker. If you need to
821+ run your addon with multithreaded features, we recommend you use A & D or C & E.
821822
822823Note: For browsers, all the multithreaded features relying on Web Workers (Emscripten pthread also relying on Web Workers)
823824require cross-origin isolation to enable ` SharedArrayBuffer ` . You can make a page cross-origin isolated
@@ -879,6 +880,7 @@ elseif(CMAKE_C_COMPILER_TARGET STREQUAL "wasm32-wasi-threads")
879880 " -Wl,--export-if-defined=node_api_module_get_api_version_v1"
880881 " -Wl,--export=malloc"
881882 " -Wl,--export=free"
883+ " -Wl,--export=emnapi_thread_crashed"
882884 " -Wl,--import-undefined"
883885 " -Wl,--export-table"
884886 )
You can’t perform that action at this time.
0 commit comments