Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by oulipo on Wednesday September 25, 2024 @04:34AM
(#41645154)
thanks for your answer!! Can you tell me a bit more about why this suggestion might be more appropriate than the others?
Is it in terms of maturity? Speed? Memory footprint? Safety?
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by vshymanskyy on Wednesday September 25, 2024 @06:30AM
(#41645800)
Wasm3 happily runs on ESP32, it provides a fully dynamic wasm runtime. But it's much slower than AOT compiled native code, obviously.
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by oulipo on Wednesday September 25, 2024 @04:49AM
(#41645252)
Actually in my case I need a VM, because I want users to be able to upload "extension plugins" in real-time, without reuploading firmware
In that case which approach / library would you recommend to embedd a WASM VM?
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by vshymanskyy on Wednesday September 25, 2024 @06:27AM
(#41645776)
This is exactly what wasm2mpy does for MicroPython: Dynamically loaded, AOT-compiled WASM modules
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by oulipo on Wednesday September 25, 2024 @07:36PM
(#41652991)
Okay great! But I'm not using MicroPython, just compiling directly for the ESP32, would that mean that to use wasm2mpy I would need to add a MicroPython VM in my code?
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by oulipo on Wednesday September 25, 2024 @07:38PM
(#41653006)
would you say that using wasm2mpy is better suited for my needs than having a wasm runtime like the one of bytecodealliance? What would be the advantage in this case?
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by vshymanskyy on Thursday September 26, 2024 @07:16AM
(#41657026)
Yes, for these microcontroller-type chips, ahead-of-time compilation would be definitely more suitable. WAMR probably supports it, but you can also to it via WASM2C, easily. I prefer not depending on WAMR, it is very bloated
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by oulipo on Friday September 27, 2024 @09:16AM
(#41670062)
thanks for all those answers! Slava Ukraini
Re:Wasm2Mpy: Compiling WASM to MicroPython so it can run on ...
by vshymanskyy on Sunday September 29, 2024 @06:05AM
(#41686239)
Geroyam Slava!
It obviously depends on your needs/goals.
P.S. I'm also the author of wasm3