-
Notifications
You must be signed in to change notification settings - Fork 54
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
New @ruby/wasm-wasi package without .wasm? #282
Comments
Thanks for your detail report and sorry for my late response (I couldn't participate any OSS work for a while due to some contracts) I'm very happy to hear that polyscript supports Ruby!
The main reason for splitting into different packages is to share Version specific packages (e.g.
Thank you for pointing out. That's my bad. Will update it soon.
I know it's not ideal for your use case and it would be non-trivial cost to maintain two versions of the packages. One of the mitigations would be reading I'm still exploring a way to satisfy the multi Ruby version requirement and user friendliness at the same time. |
I had a closer look at your case. It looks like you are importing the |
as polyscript supports Lua (wasmoon), Python (pyodide + micropython), PHP (experimental), QuickJS (experimental), WebR (experimental) and whatnot, we'd love to fully support Ruby (half-experimental, it works great already for some use case) and we inevitably load interpreters and related code lazily, otherwise the project would die behind 50MB download to start with 😅 I appreciate you looking into it, we can always pin-point default versions ourselves, the thing is that in polyscript one can explicitly define a Ruby version indeed, and we've no idea where to grab its WASM related counterpart to make it work ... the default can work fine, but users opting for another version would be hard for us to track. If the dance out of a specific version can be bound to the very same URL, everything would be fine, as it's been until now, thank you! |
Let me summarize the problem here: First, there are several library consumer use cases.
In 1 and 2, they can simply replace their But 3 and 4 cannot easily grab the corresponding So I decided to keep placing ES Module and UMD shims only for 3 and 4 use cases. My deprecation plan is:
|
@kateinoigakukun I am not sure I am following but ESM is the only way forward for JS. On the web, our issue is that we don't know where to find the To us, like it is for every other project we deal with until now, we expect the following:
UMD is a dead standard, it breaks with ECMAScript standard modules and it's been abandoned by everyone. CJS is still used in Node but ultimately both bun and deno and every browser uses ESM so it's less interesting as a target and node deals very well with ESM too since version 16+. Is there by any chance the will to provide such simple approach so that both versioning of the module and the WASM file are always in sync and we need to deal only with one pre-resolved CDN URL instead? Thanks! |
@WebReflection Hi. You can find .js and .wasm under the same base URL since 2.2.0 without any deprecation warning. |
I considered moving all .wasm binaries for all Ruby versions into |
@kateinoigakukun awesome, thanks for that! |
I just spotted the deprecation warning:
However, it's not clear to me why I need one CDN to grab
@ruby/wasm-wasi/dist/browser.esm.js
and another CDN url to grab itsruby-3_2-wasm-wasi@latest/dist/ruby.wasm
counterpart.Your documentation is also a bit off around this deprecation.
Is there by any chance a will to move per version the
ruby.wasm
file within the main package? We pin the version and resolve the URL with ease this way, keeping track of versioning and 2 different URLs looks a bit unnecessary to me, or surely not ideal or user friendly, thank you!The text was updated successfully, but these errors were encountered: