Update examples collection
This commit is contained in:
parent
8bc9f30d87
commit
87d3066428
1 changed files with 21502 additions and 0 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