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
Hey! Amazing project and it got me thinking about how to build playgrounds for Ruby projects online without a server side Ruby process.
#9 mentions that we can use Emscripten's filesystem API to ship the standard library and other gems that we need. But what if some gem has C extensions, how would we compile that to webassembly and load them via Ruby?
The text was updated successfully, but these errors were encountered:
I'm pretty sure the approach requiring the least surgery would be to compile and link the gem's C sources into the Ruby executable and to merge the gem's Ruby sources into the filesystem. At this point it's not so much a gem as it is a distribution of Ruby which incorporates the gem.
Emscripten supports dlopen() so in principle gems could be loaded from external .wasm modules at runtime, but I strongly suspect getting gem to produce output which a WebAssembly ruby can dynamically link would be more difficult than incorporating extra native code into the existing build.
Hey! Amazing project and it got me thinking about how to build playgrounds for Ruby projects online without a server side Ruby process.
#9 mentions that we can use Emscripten's filesystem API to ship the standard library and other gems that we need. But what if some gem has C extensions, how would we compile that to webassembly and load them via Ruby?
The text was updated successfully, but these errors were encountered: