code copied from https://nishtahir.com/embedded-wasm-on-a-d1-mini-with-wasm3/ with some tweaks to get it to build