Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

in the browser you can compile modules and create instances from arrays of numbers/bytes, here's an obfuscated example: https://wasmgroundup.com/blog/wasm-compiler-in-a-tweet

if the host provides the guest wasm module via imports a function to create and run from an array of bytes then it can be done today (if I understand you correctly).

Here's some related content: https://github.com/pdubroy/til/blob/main/wasm/2024-02-22-Run...



Yes, this can be done today, though it needs some gluing together. On the Web (and in Node etc.) you can use JavaScript to create and link the modules, which is how dynamic linking support for wasm works there:

https://emscripten.org/docs/compiling/Dynamic-Linking.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: