Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse wasm runtime from node.js #8772

Open
kdy1 opened this issue Mar 25, 2024 · 1 comment
Open

Reuse wasm runtime from node.js #8772

kdy1 opened this issue Mar 25, 2024 · 1 comment

Comments

@kdy1
Copy link
Member

kdy1 commented Mar 25, 2024

Describe the feature

Not sure if this is possible, but it will be nice if we can avoid bundling our wasm runtime.

cc @kwonoj Is this possible, or does it sound good to you?

(This is an issue to get some feedback publicly, not necessairly meaning the core team work on this thing)

Babel plugin or link to the feature description

No response

Additional context

No response

@kwonoj
Copy link
Member

kwonoj commented Mar 26, 2024

Yes, not impossible, https://docs.rs/wasmer/latest/wasmer/

Run Wasmer in a JavaScript environment — With the js Cargo feature, it is possible to compile a Rust program using Wasmer to WebAssembly. In this context, the resulting WebAssembly module will expect to run in a JavaScript environment, like a browser, Node.js, Deno and so on. In this specific scenario, there is no engines or compilers available, it’s the one available in the JavaScript environment that will be used.

There'll be some platform differences though, i.e wasmer support wasi while node.js doesn't stablize it yet, and browser will have entirely different context, etcs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants