Skip to content

Commit de805b9

Browse files
committed
Add needed additional exported runtime metods
- AAded the "addFunction", "removeFunction", "serValue"
1 parent 468436a commit de805b9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

modules/wasm.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,9 @@ def run_task_generate():
592592
"-s",
593593
f"EXPORTED_FUNCTIONS={complete_functions_list}",
594594
"-s",
595-
'EXPORTED_RUNTIME_METHODS=\'["ccall", "cwrap", "wasmExports", "HEAP8", "HEAP16", "HEAP32", "HEAPU8", "HEAPU16", "HEAPU32", "HEAPF32", "HEAPF64"]\'',
595+
'EXPORTED_RUNTIME_METHODS=\'["ccall", "cwrap", "wasmExports", "addFunction", "removeFunction", "setValue", "HEAP8", "HEAP16", "HEAP32", "HEAPU8", "HEAPU16", "HEAPU32", "HEAPF32", "HEAPF64"]\'',
596+
"-s",
597+
"ALLOW_TABLE_GROWTH=1",
596598
"custom.cpp",
597599
lib_file_out,
598600
"-I{0}".format(include_dir),
@@ -625,7 +627,9 @@ def run_task_generate():
625627
*base_command,
626628
"-s" "EXPORT_ES6=1",
627629
"-s",
628-
'EXPORTED_RUNTIME_METHODS=\'["ccall", "cwrap", "wasmExports", "HEAP8", "HEAP16", "HEAP32", "HEAPU8", "HEAPU16", "HEAPU32", "HEAPF32", "HEAPF64"]\'',
630+
'EXPORTED_RUNTIME_METHODS=\'["ccall", "cwrap", "wasmExports", "addFunction", "removeFunction", "setValue", "HEAP8", "HEAP16", "HEAP32", "HEAPU8", "HEAPU16", "HEAPU32", "HEAPF32", "HEAPF64"]\'',
631+
"-s",
632+
"ALLOW_TABLE_GROWTH=1",
629633
"-o",
630634
os.path.join(gen_out_dir, "pdfium.esm.js"),
631635
]

0 commit comments

Comments
 (0)