#include #include #if defined(__EMSCRIPTEN__) #include #define WASM_EXPORT EMSCRIPTEN_KEEPALIVE #else #define WASM_EXPORT #endif extern "C" { WASM_EXPORT int add(int a, int b) { return a + b; } WASM_EXPORT int hello_version() { return 1; } }