Update examples collection
This commit is contained in:
parent
bd4072b2fa
commit
f54d586953
1 changed files with 22230 additions and 13 deletions
16
emsdk-cache/emsdk-main/bazel/test_external/hello-embind.cc
Normal file
16
emsdk-cache/emsdk-main/bazel/test_external/hello-embind.cc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#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);
|
||||
}
|
||||
Loading…
Reference in a new issue