view third_party/emsdk/bazel/test_external/hello-embind.cc @ 215:c3df85159b31

removed a python library that isn't used for much.
author June Park <parkjune1995@gmail.com>
date Sat, 28 Feb 2026 20:34:18 -0800
parents 8d17f6e6e290
children
line wrap: on
line source

#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);
}