-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Context
Currently, we have to load the ruby.wasm (via the @rails-tutorial/wasm NPM package) every time we initialize the WebContainer (does it uses any caching mechanism for node_modules/? not sure). That could be a blocker (and especially annoying in development when we need to reload the page often).
Task
We need to figure out if we can store the Wasm module in the browser (using File System API, for example—I used it at Workbook, worked fine) and mount it into a WebContainer on start.
The trickiest part here is, probably, to orchestrate the commands: we need to ensure that the Wasm is mounted before running any Rails command.
Previous attempts
I tried to keep the .wasm file within the template (src/templates/default) but that worked even worse, litterally freezing the browser for dozens of seconds.