I have a C++ project that uses EMSDK to compile to WebAssembly. I have an asset that my project loads, a bundle.zip that I currently use the '--embed-file' flag from the SDK at compile time, and this works.
However, I would like to know if there is a way, in HTML or JavaScript, to pre-load this asset. So, instead of having to rebuild my project every time I change something in 'bundle.zip', I would just upload it and keep the same '.wasm'.
Is this option available? When searching online, I only found questions and answers related to C#'s Blazor, which is not related to what I want.
A crucial detail is that my application needs to read this file from the file system, as if it were on the native platform, not on the web (it does a fopen).
from WebAssembly pre-fetch external resources and then use fopen on it
No comments:
Post a Comment