sergeypdev e80c619c04 Squashed 'libs/emsdk/' content from commit 3bcf1dcd0
git-subtree-dir: libs/emsdk
git-subtree-split: 3bcf1dcd01f040f370e10fe673a092d9ed79ebb5
2025-05-23 14:52:11 +04:00

17 lines
355 B
C++

#include <emscripten/bind.h>
using namespace emscripten;
class HelloClass {
public:
static std::string SayHello(const std::string &name) {
return "Yo! " + name;
};
};
EMSCRIPTEN_BINDINGS(Hello) {
emscripten::class_<HelloClass>("HelloClass")
.constructor<>()
.class_function("SayHello", &HelloClass::SayHello);
}