--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/1b7778de-a61c-44fe-9b65-3479dfdbbc1dn%40googlegroups.com.
Can you share the full link command you are using?
Can you take a look at the generated JS file? Do you see the `_embind_register_void` function in that file? It should be defined as a function then added to the `asmLibraryArg` object which gets passed to instantiate.
cheers,sam
--On Thu, Oct 13, 2022 at 7:30 AM Sohan Jyoti Ghosh <soh...@chromium.org> wrote:Hi !I am getting errors while instantiating Array Buffer,WebAssembly.instantiate(binary, info)The error is,"Uncaught (in promise) RuntimeError: Aborted(LinkError: WebAssembly.instantiate(): Import #1 module="env" function="_embind_register_void" error: function import requires a callable)"Any pointers, how "env" obj is missing the function ? And how to resolve it ? I am using the JS template coming out of emscripten.Is there some error in building the .wasm ? Nothing is reported on the build log though.Br,Sohan--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/1b7778de-a61c-44fe-9b65-3479dfdbbc1dn%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va29KUrmS82TbqrzuGMU36fZDHdVpJsLG7fne2kg7o9CjqA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAOtrQ7ys8aWVjkRXCgdyvYvucNkeUhA6BrKEHiUAyj3w7tCJyA%40mail.gmail.com.
In general it is not possible to swap the JS and wasm files that emscripten generates. The JS is highly specific to the wasm module, and not portable between wasm modules.
IIRC many folks have had success compiling skia to wasm already. Have you looked at https://skia.org/docs/user/modules/canvaskit/?
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-%2BefpSXiyFkF3KjoHJagX737FSKZuq79prEeQpQGb%3DAQ%40mail.gmail.com.
The native Application::Create/HelloWorld Ctor we try to use needs some platformData, I wonder how we can provide it from JS/HTML.
We saw how Canvaskit does the initialization https://github.com/google/skia/blob/main/demos.skia.org/demos/hello_world/index.html or how Box2D https://github.com/kripken/box2d.js/blob/master/demo/webgl/box2d.html#L24
, Bullet(ammo.js) https://github.com/kripken/ammo.js/blob/main/examples/webgl_demo/ammo.html#L56 does.
Are there some other examples we can refer to, to instantiate and control C++ objects/functions from JS.
Br,
Sohan
Hi !
Thanks for the pointers, the generated JS was indeed very specific.We are finally able to load the .wasm module with some minor changes in the generated JS (loading via module) .Now, we need help to initialize the native code and invoke the functions from JS/HTML ?The native Application::Create/HelloWorld Ctor we try to use needs some platformData, I wonder how we can provide it from JS/HTML.
We saw how Canvaskit does the initialization https://github.com/google/skia/blob/main/demos.skia.org/demos/hello_world/index.html or how Box2D https://github.com/kripken/box2d.js/blob/master/demo/webgl/box2d.html#L24, Bullet(ammo.js) https://github.com/kripken/ammo.js/blob/main/examples/webgl_demo/ammo.html#L56 does.
Are there some other examples we can refer to, to instantiate and control C++ objects/functions from JS.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAOtrQ7yGeQs04mSJSHwHeweW9R%3DdxCYL1JCLm6gUFLf88tsTyg%40mail.gmail.com.