This doesn't look like an emscripten question.. wrong list maybe?

On Wed, Jan 13, 2021 at 6:37 AM Tim Co <[email protected]> wrote:

> I have the Rust/Wasi HQ9+ example running in a WasmerJS Svelte app and can
> access the same wasmFS filesystem with both. All good so far.
>
> What I want to do now is be able to expose APIs from Rust to the app
> JavaScript and vice versa. I've been trying to do this with wasm-bindgen,
> and did manage to expose a function in the wasi `instance.exports` in
> addition to the Rust `main()` but my changes also cause an error, and I
> don't know how to call the function anyway. I was trying to combine the
> WasmerJS style with the wasm-bindgen style described in this article (
> https://hacks.mozilla.org/2018/04/javascript-to-rust-and-back-again-a-wasm-bindgen-tale/)
> but I don't know what I'm doing.
>
> Does anyone know how to go about this or have a WasmerJS example which
> does more than call the `main()` of a WASI backend? It doesn't have to be
> Rust, although that would be best obvs.
>
> I'd also like to be able to make calls from the Rust back to the JS app.
>
> Oh, my working WasmerJS Rust example code is at:
> https://github.com/happybeing/svelte-wasi-with-rust
>
> Also, I have a github issue for this if anyone prefers to comment there:
> https://github.com/wasmerio/wasmer-js/issues/250#issuecomment-758764887
>
> Thanks.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/aefbec4f-4e27-4807-ba13-445365c8cb17n%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/aefbec4f-4e27-4807-ba13-445365c8cb17n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va29mRBKj2%3DyEdnvU89qMLZefTw%2B48nKj8qKPfnFeAkEPAw%40mail.gmail.com.

Reply via email to