ern0 / howto-wasm-minimal
- четверг, 14 апреля 2022 г. в 00:31:55
How to create minimal wasm module
How to create minimal wasm module - PoC
Symptom: on some systems, the linker may hang, or produce output file with correct size but full of zeros (that's why build script contains a hexdump as last step).
Solution: update your linker.
More info: https://stackoverflow.com/questions/71573019/cant-compile-to-wasm-on-linux
You need CLANG and CLANG's linker (LLD). Tested on versions 13 and 14.
Debian nightly pacakges: https://apt.llvm.org/
On Windows, you may use Chocolatey package manager to install CLANG: https://chocolatey.org/
Writing web app in any language which is not JavaScript is just pure joy.
The color change and the blur effect is a WASM module, written in C: