summaryrefslogtreecommitdiff
path: root/src/binaryen-c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r--src/binaryen-c.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index 67eda040a..6f9878535 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -55,7 +55,10 @@
#define WASM_DEPRECATED
#endif
-#if defined(_MSC_VER) && !defined(BUILD_STATIC_LIBRARY)
+#if defined(__EMSCRIPTEN__)
+#include <emscripten.h>
+#define BINARYEN_API EMSCRIPTEN_KEEPALIVE
+#elif defined(_MSC_VER) && !defined(BUILD_STATIC_LIBRARY)
#define BINARYEN_API __declspec(dllexport)
#else
#define BINARYEN_API