comparison third_party/emsdk/bazel/test_external/hello-embind.cc @ 186:8cf4ec5e2191 hg-web

Fixed merge conflict.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:38:59 -0800
parents 8d17f6e6e290
children
comparison
equal deleted inserted replaced
176:fed99fc04e12 186:8cf4ec5e2191
1 #include <emscripten/bind.h>
2
3 using namespace emscripten;
4
5 class HelloClass {
6 public:
7 static std::string SayHello(const std::string &name) {
8 return "Yo! " + name;
9 };
10 };
11
12 EMSCRIPTEN_BINDINGS(Hello) {
13 emscripten::class_<HelloClass>("HelloClass")
14 .constructor<>()
15 .class_function("SayHello", &HelloClass::SayHello);
16 }