From 5be79e91bfce8db9bf26828492bee03b7d551b12 Mon Sep 17 00:00:00 2001 From: Jinny You Date: Mon, 2 Dec 2024 18:16:05 +0900 Subject: [PATCH] wip --- cross/wasm32_wg.txt | 2 +- src/bindings/wasm/tvgWasmLottieAnimation.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cross/wasm32_wg.txt b/cross/wasm32_wg.txt index 5340a399..3fa58343 100644 --- a/cross/wasm32_wg.txt +++ b/cross/wasm32_wg.txt @@ -12,7 +12,7 @@ exe_suffix = 'js' [built-in options] cpp_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions'] -cpp_link_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions', '--bind', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sEXPORT_ES6=1', '-sFORCE_FILESYSTEM=1', '-sMODULARIZE=1', '-sEXPORTED_RUNTIME_METHODS=FS', '-sUSE_WEBGPU=1', '-sASYNCIFY=1', '-sSTACK_SIZE=4MB'] +cpp_link_args = ['-Wshift-negative-value', '-flto', '-Os', '-fno-exceptions', '--bind', '-sWASM=1', '-sALLOW_MEMORY_GROWTH=1', '-sEXPORT_ES6=1', '-sFORCE_FILESYSTEM=1', '-sMODULARIZE=1', '-sEXPORTED_RUNTIME_METHODS=FS', '-sUSE_WEBGPU=1', '-sASYNCIFY=2', '-sASYNCIFY_EXPORTS=["init"]', '-sSTACK_SIZE=4MB'] [host_machine] system = 'emscripten' diff --git a/src/bindings/wasm/tvgWasmLottieAnimation.cpp b/src/bindings/wasm/tvgWasmLottieAnimation.cpp index 58f21045..7d02498d 100644 --- a/src/bindings/wasm/tvgWasmLottieAnimation.cpp +++ b/src/bindings/wasm/tvgWasmLottieAnimation.cpp @@ -484,7 +484,7 @@ private: EMSCRIPTEN_BINDINGS(thorvg_bindings) { - emscripten::function("init", &init); + emscripten::function("init", &init, emscripten::async()); emscripten::function("term", &term); class_("TvgLottieAnimation")