File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,14 @@ if(ZMQ_WASM OR CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
100
100
# export an indirect function table for napi-wasm
101
101
add_link_options ("--export-table" )
102
102
103
- add_compile_options ("-fwasm-exceptions" )
104
-
105
103
# Add WebAssembly-specific exports for napi-wasm
106
104
add_link_options ("SHELL:-s EXPORTED_FUNCTIONS=['_malloc','_free','_napi_register_wasm_v1']" )
107
105
add_link_options ("SHELL:-s EXPORTED_RUNTIME_METHODS=['ccall','cwrap']" )
108
106
add_link_options ("SHELL:-s ALLOW_MEMORY_GROWTH=1" )
109
-
110
- # Allow undefined symbols on Linux for runtime loading
107
+ add_link_options ("SHELL:-s ENVIRONMENT='node'" )
111
108
add_link_options ("SHELL:-s ERROR_ON_UNDEFINED_SYMBOLS=0" )
112
- add_link_options ("SHELL:-Wl,--unresolved-symbols=ignore-all" )
109
+ add_link_options ("SHELL:-s DISABLE_EXCEPTION_CATCHING=0" )
110
+ add_link_options ("--no-entry" )
113
111
endif ()
114
112
115
113
# Set MacOS deployment target
@@ -162,6 +160,7 @@ project_options(
162
160
ENABLE_CACHE
163
161
ENABLE_COMPILE_COMMANDS_SYMLINK
164
162
${ENABLE_SANITIZER_UNDEFINED}
163
+ ENABLE_INTERPROCEDURAL_OPTIMIZATION
165
164
)
166
165
167
166
file (GLOB_RECURSE SOURCES "./src/*.cc" "./src/*.cpp" )
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ async function main() {
24
24
const wasm = await getWasm ( )
25
25
26
26
const { instance} = await WebAssembly . instantiate ( wasm , {
27
- env : napi ,
27
+ napi : napi ,
28
+ env : { } // The env imports will be provided by napi-wasm
28
29
} )
29
30
30
31
// Create an environment.
You can’t perform that action at this time.
0 commit comments