Skip to content

Instantly share code, notes, and snippets.

@kripken
Created April 9, 2021 22:59
Show Gist options
  • Save kripken/998fe48f331f771ca089f92f738c14fb to your computer and use it in GitHub Desktop.
Save kripken/998fe48f331f771ca089f92f738c14fb to your computer and use it in GitHub Desktop.
extern "C" int foo();
int main() {
foo();
}
mergeInto(LibraryManager.library, {
foo: function() {
return {{{ C_STRUCTS.emscripten_fetch_attr_t.attributes }}};
}
});
..
function _foo() {
return 52;
}
..
./emcc a.cpp --js-library a.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment