Skip to content

Instantly share code, notes, and snippets.

@xeecos
Created April 21, 2025 09:03
Show Gist options
  • Select an option

  • Save xeecos/63c1d14a73ad40d5c7a1437215e17024 to your computer and use it in GitHub Desktop.

Select an option

Save xeecos/63c1d14a73ad40d5c7a1437215e17024 to your computer and use it in GitHub Desktop.
test wasm
#include <emscripten/bind.h>
#include <emscripten/val.h>
val print_test(const char* infile, const char* outfile)
{
val ret = val::object();
//processing
ret.set("res", 0);
return ret;
}
EMSCRIPTEN_BINDINGS(xxx)
{
emscripten::function("print_test", &print_test);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment