mirror of
https://git.webmc.xyz/Starlike-Client/Starlike-Client
synced 2025-07-22 13:41:16 -09:00
17 lines
355 B
C++
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);
|
|
}
|