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
What is an issue which you want to solve with your feature request?
I want to have a single "vim.html" where everything is contained, even if it makes the file bigger. I already embedded the "VimWasm.js" inside a <script>.
So in this I only have to "import" the "vim.js" file like this:
constscreenCanvasElement=document.getElementById('vim-screen');constvim=newVimWasm({// VimWasm is available in the global scope via window.VimWasm(loaded via <script>)workerScriptPath: './node_modules/vim-wasm/small/vim.js',canvas: screenCanvasElement,input: document.getElementById('vim-input'),});
The problem is that when you're inside of vim.js it uses fetch to get the vim.wasm binary so you need a server running to have this working.
I have tried edit the code myself but it uses both WebAssembly.instantiate and WebAssembly.instantiateStreaming so I'm not exactly sure what to do thus I'm opening this issue.
Additional context (if any)
The text was updated successfully, but these errors were encountered:
What is an issue which you want to solve with your feature request?
I want to have a single "vim.html" where everything is contained, even if it makes the file bigger. I already embedded the "VimWasm.js" inside a <script>.
So in this I only have to "import" the "vim.js" file like this:
The problem is that when you're inside of vim.js it uses
fetch
to get the vim.wasm binary so you need a server running to have this working.Describe the solution you'd like
The solutions would be that you can actually embed .wasm inside of a .html file via base64 encoding, this might not be the most good for performance but for portability it's great!( see https://stackoverflow.com/questions/52582367/a-single-file-webassembly-html-demo and https://gist.github.com/dio/ae79cf546e808a9bc46515bf9400ad5d)
I have tried edit the code myself but it uses both
WebAssembly.instantiate
andWebAssembly.instantiateStreaming
so I'm not exactly sure what to do thus I'm opening this issue.Additional context (if any)
The text was updated successfully, but these errors were encountered: