At the moment, the Wasm module for lua vm needs to be fetched from the internet. This works nicely in the browser (just another package to fetch), but for server side it would be beneficial if the library was self-contained.
as far as I understand, the best way to do that would be to embedd a base64 encoded module as a sting in source file. That’s, for example, how deno implements deno-dom:
At the moment, the Wasm module for lua vm needs to be fetched from the internet. This works nicely in the browser (just another package to fetch), but for server side it would be beneficial if the library was self-contained.
as far as I understand, the best way to do that would be to embedd a base64 encoded module as a sting in source file. That’s, for example, how deno implements deno-dom:
https://github.com/b-fuze/deno-dom/blob/e18ab07fd6e23f1e32ffd77fb4c0f92fadb81b87/build/deno-wasm/deno-wasm.js#L175