flst / upstream /emscripten /test /codesize /embind_hello_world.cpp
arudradey's picture
Upload folder using huggingface_hub
00df61d verified
Raw
History Blame Contribute Delete
286 Bytes
#include <string>
#include <emscripten/emscripten.h>
#include <emscripten/bind.h>
using namespace emscripten;
int main() {
EM_ASM(out(Module.getString()));
}
std::string getString() {
return "Hello, world";
}
EMSCRIPTEN_BINDINGS(typeOf) {
function("getString", &getString);
}