Using wasmtime: https://velostudio.github.io/blog/levo.html
This definitely looks interesting, and similar to what I am doing (a Bevy game with WASM as a modding system). Does it actually run in the browser though? Or only in the "browser-like" desktop application? Would be really cool if it actually ran in the browser as well as the desktop app.
While wasmtime doesn't work on the browser, there are solution around it, like wasm-bridge and wasm_component_layer.
Karel Hrkal (kajacx) said:
This definitely looks interesting, and similar to what I am doing (a Bevy game with WASM as a modding system). Does it actually run in the browser though? Or only in the "browser-like" desktop application? Would be really cool if it actually ran in the browser as well as the desktop app.
While wasmtime doesn't work on the browser, there are solution around it, like wasm-bridge and wasm_component_layer.
The Portal is just a native desktop app, since as you point out wasmtime usage limits it to the desktop. Thanks for sharing the links! It was on our long term wishlist to make it run in the browser too, so it's awesome to see you're already doing the work. It would be interesting to see if we could rebase on wasm-bridge, but would have to check if there are any other non-web dependencies that would need to be adapted as well.
We'd like to focus on fleshing out the Portal API and app first though, before we consider "web embed" (really bringing back the Flash era now...)
Potentially related proposal:
https://github.com/WebAssembly/esm-integration/blob/main/proposals/esm-integration/README.md
Hi, Someone told me that javy just wraps javascript in quickjs. but it looks to me like it does more. what is it that it actually does?
what is it that it actually does?
Javy (the CLI) takes JavaScript source code as input and creates a Wasm module that will execute that JavaScript source code using the QuickJS interpreter. The CLI also has a dynamic linking mode where you can create a very small WebAssembly module that links against a provider module containing the QuickJS interpreter compiled to Wasm.
There are a few library crates that are part of Javy that are published to crates.io for building your own WebAssembly modules that can use the QuickJS interpreter to execute JavaScript source code and adding support for some JavaScript APIs to Javy (for example, TextDecoder
/TextEncoder
).
Last updated: Dec 23 2024 at 12:05 UTC