Skip to content

Commit 10dcc58

Browse files
authored
Fix Emscripten warnings by removing deprecated writeAsciiToMemory (#2724)
The Emscripten function writeAsciiToMemory has been deprecated and logs warnings during the build process. - Replaced usages of writeAsciiToMemory in wabt.post.js with TextEncoder - Fixed a 1-byte buffer overflow in allocateCString - Removed writeAsciiToMemory from CMake EXPORTED_RUNTIME_METHODS
1 parent d8e3fe6 commit 10dcc58

File tree

4 files changed

+47
-75
lines changed

4 files changed

+47
-75
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ if (EMSCRIPTEN)
830830
-sALLOW_MEMORY_GROWTH
831831
-sEXPORT_ES6
832832
-sEXPORT_NAME=WabtModule
833-
-sEXPORTED_RUNTIME_METHODS=writeAsciiToMemory
833+
-sEXPORTED_RUNTIME_METHODS=stringToNewUTF8,lengthBytesUTF8
834834
-Oz
835835
)
836836
string(REPLACE ";" " " LIBWABT_LINK_FLAGS_STR "${LIBWABT_LINK_FLAGS}")

0 commit comments

Comments
 (0)