16 lines
230 B
C++
16 lines
230 B
C++
#include <iostream>
|
|
#include <emscripten/emscripten.h>
|
|
|
|
extern "C" {
|
|
|
|
EMSCRIPTEN_KEEPALIVE
|
|
int add(int a, int b) {
|
|
return a + b;
|
|
}
|
|
|
|
EMSCRIPTEN_KEEPALIVE
|
|
void hello() {
|
|
std::cout << "Hello from C++ WASM!" << std::endl;
|
|
}
|
|
|
|
} |