2 ms·
Sounds a bit similar to assemblyscript. I wonder if there's a connection between those projects. Assembly script targeting WASM on small devices might be useful
by jillesvangurp 3y ago
Sounds a bit similar to assemblyscript. I wonder if there's a connection between those projects. Assembly script targeting WASM on small devices might be useful.
- oneplane 3y agoI was thinking the same thing, just like TinyGo can target both microcontrollers and WASM.
- mmoskal 3y agoWe need to add a doc page about relationship with WASM... In short, WASM was not designed to be interpreted, and definitely not on small devices. The DeviceScript VM bytecode is designed to run directly from flash (read-only memory of which you have typically 10x more on an embedded system), with minimal overheads. Also WASM is not designed as a runtime for a dynamic language, eg., + operator would be for two i32 and what you really want for JavaScript semantics is to have a + operator that works on strings, NaN-boxed numbers, etc. As for AssemblyScript, I guess it's meant as language for small fragments of your code, not the whole application. For application you would be probably better off with Rust or similar and native compilation.
- mmoskal 3y agoPromised docs here: https://microsoft.github.io/devicescript/language/runtime#why-not-web-assembly-wasm https://microsoft.github.io/devicescript/language/runtime#wh...