2026-05-16 11:01:20 +05:30
|
|
|
#include <cstdint>
|
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
|
|
#if defined(__EMSCRIPTEN__)
|
|
|
|
|
#include <emscripten/emscripten.h>
|
|
|
|
|
#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;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-22 15:18:47 +05:30
|
|
|
}
|