You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Ruby.Wasm is written with separate implementations for Node and Browser.
I can see considerable ingenuity and hard work. Thank you for all the work you have done. Now, I have found a way to solve this difficulty.
The swiftwasm team is developing uwasi, which seems to cover both Node and Browser implementations.
Asciidoctor-wasm implements DefaultRubyVM using this uwasi.
If this implementation is adopted so that there is no need to separate the Browser and Node implementations, users will not have to distinguish between the Import of the Node and Browser implementations when using Ruby.wasm, which would be a great improvement. Please consider this.
Cheers
The text was updated successfully, but these errors were encountered:
Despite its name, @bjorn3/browser_wasi_shim also works on Node.js as long as you don't need to access host file system (it only works for in-memory fs). So if you don't care much about code size and underlying file system, you can use @bjorn3/browser_wasi_shim instead of uwasi.
Having said that, @ruby/wasm-wasi package itself cannot assume people don't care about the file system access on Node.js, so we use Node's wasi implementation as a less-restrictive option by default .
uwasi doesn't have file system implementation yet (and I don't have enough time working on that 😓), and @bjorn3/browser_wasi_shim had several contributors, so I decided to put my effort into fixing it instead of growing uwasi up.
The current Ruby.Wasm is written with separate implementations for Node and Browser.
I can see considerable ingenuity and hard work. Thank you for all the work you have done. Now, I have found a way to solve this difficulty.
The swiftwasm team is developing uwasi, which seems to cover both Node and Browser implementations.
Asciidoctor-wasm implements DefaultRubyVM using this uwasi.
https://github.com/tani/asciidoctor-wasm/blob/f7a240f03c4d33d1235f68cda2497bda874988a0/src/asciidoctor.ts#L1-L21
If this implementation is adopted so that there is no need to separate the Browser and Node implementations, users will not have to distinguish between the Import of the Node and Browser implementations when using Ruby.wasm, which would be a great improvement. Please consider this.
Cheers
The text was updated successfully, but these errors were encountered: