File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,3 +2,15 @@ export const include: string
22export const include_dir : string
33export const js_library : string
44export const sources : string [ ]
5+ export const targets : string
6+ export const requiredConfig : {
7+ emscripten : {
8+ settings : Record < string , string | string [ ] >
9+ }
10+ clang : {
11+ target : string
12+ cflags : string [ ]
13+ ldflags : string [ ]
14+ wasmld : string [ ]
15+ }
16+ }
Original file line number Diff line number Diff line change @@ -28,3 +28,39 @@ exports.include_dir = includeDir
2828exports . js_library = jsLibrary
2929exports . sources = sources
3030exports . targets = targets
31+
32+ exports . requiredConfig = {
33+ emscripten : {
34+ settings : {
35+ WASM_BIGINT : '1' ,
36+ ALLOW_MEMORY_GROWTH : '1' ,
37+ MIN_CHROME_VERSION : '85' ,
38+ EXPORTED_RUNTIME_METHODS : [
39+ 'emnapiInit'
40+ ] ,
41+ EXPORTED_FUNCTIONS : [
42+ '_malloc' ,
43+ '_free' ,
44+ '_napi_register_wasm_v1' ,
45+ '_node_api_module_get_api_version_v1'
46+ ]
47+ }
48+ } ,
49+ clang : {
50+ target : 'wasm32-wasip1-threads' ,
51+ cflags : [ '-matomics' , '-mbulk-memory' ] ,
52+ ldflags : [ '-mexec-model=reactor' ] ,
53+ wasmld : [
54+ '--import-memory' ,
55+ '--shared-memory' ,
56+ '--export-table' ,
57+ '--export=malloc' ,
58+ '--export=free' ,
59+ '--export=napi_register_wasm_v1' ,
60+ '--export-if-defined=node_api_module_get_api_version_v1' ,
61+ '--export=emnapi_thread_crashed' ,
62+ '--export-if-defined=emnapi_async_worker_create' ,
63+ '--export-if-defined=emnapi_async_worker_init'
64+ ]
65+ }
66+ }
You can’t perform that action at this time.
0 commit comments