That's an interesting idea: use #WeWebAssembly for embedded #IoT devices:
https://thenewstack.io/why-webassembly-is-perfect-for-tiny-iot-devices/
The benefit would be a clearer separation between application code and the operating system, and would allow users to develop the application that runs on a device in their preferred language, and not forced to write in low-level embedded languages like C/C++.
Runtimes like https://github.com/bytecodealliance/wasm-micro-runtime are only 135 KB (plus the operating system) and could fit a #NordicSemiconductor #nRF9160.
Why WebAssembly Is Perfect for Tiny IoT Devices

Wasm is a lightweight, efficient, secure runtime that's perfect for devices with limited resources. It's also flexible and platform-independent, which makes it easy to develop applications for a wide range of hardware.

The New Stack