From c8e6c94f887f8e1f131fab4088d15cedbbbc4588 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 2 Nov 2025 22:43:00 +0100 Subject: [PATCH] Tweak MAPI wasm builds, explicit malloc/free and allow mem grow Signed-off-by: falkTX --- Makefile.plugins.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk index f5395808..1cb0d1d8 100644 --- a/Makefile.plugins.mk +++ b/Makefile.plugins.mk @@ -375,6 +375,8 @@ endif ifeq ($(WASM),true) MAPI_EXT = -mapi.js MAPI_SHARED = \ + -sALLOW_MEMORY_GROWTH \ + -sALLOW_TABLE_GROWTH \ -sEXPORT_NAME="$(MAPI_MODULE_NAME)" \ -sEXPORTED_RUNTIME_METHODS=['addFunction','lengthBytesUTF8','stringToUTF8','UTF8ToString'] \ -sMAIN_MODULE=2 \ @@ -450,7 +452,7 @@ SYMBOLS_LADSPA = -sEXPORTED_FUNCTIONS="['ladspa_descriptor']" SYMBOLS_LV2 = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl','lv2ui_descriptor']" SYMBOLS_LV2DSP = -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2_generate_ttl']" SYMBOLS_LV2UI = -sEXPORTED_FUNCTIONS="['lv2ui_descriptor']" -SYMBOLS_MAPI = -sEXPORTED_FUNCTIONS="['_mapi_create','_mapi_process','_mapi_set_parameter','_mapi_set_state','_mapi_destroy']" +SYMBOLS_MAPI = -sEXPORTED_FUNCTIONS="['_malloc','_free','_mapi_create','_mapi_process','_mapi_set_parameter','_mapi_set_state','_mapi_destroy']" SYMBOLS_VST2 = -sEXPORTED_FUNCTIONS="['VSTPluginMain']" SYMBOLS_VST3 = -sEXPORTED_FUNCTIONS="['GetPluginFactory','ModuleEntry','ModuleExit']" else ifeq ($(WINDOWS),true)