flst / upstream /emscripten /test /other /embind_tsgen_val.cpp
arudradey's picture
Upload folder using huggingface_hub
00df61d verified
Raw
History Blame Contribute Delete
339 Bytes
#include <emscripten/bind.h>
#include <emscripten/val.h>
using namespace emscripten;
int global_fn(int, int) { return 0; }
EMSCRIPTEN_BINDINGS(Test) {
function("global_fn", &global_fn);
}
int main() {
val::global("window").call<val>("setTimeout");
// Main should not be run during TypeScript generation.
abort();
return 0;
}