Am 2020-10-27 16:37, schrieb Karl Fessel:

Hi Philipp,

this is a nice idea.

But it might not just be as easy as copling with emscripten, since RIOT manages and schedules its own threads. Even though WASM is a kind of near system intermediate Bytecode it is restricted (even inside its sandbox). Especially you are not able to jump through the Bytecode since it is kept structured and has no GOTO (jmp / br). I think you are also not supposed to edit the stack (rewriting return addresses).

* Nevertheless I would like to see this.*

A second option would be to emulate a CPU/MCU in WASM an run RIOT on this.
That is actually a quite interesting option to evaluate. There are already a couple of projects for that:
https://github.com/takahirox/riscv-rust
https://github.com/d0iasm/rvemu
Of course this will be very inefficient, but this wouldn't be a productive dev environment. Just for people playing with RIOT OS. For that purpose it should be good enough.


btw.: I am currently working on running WASM inside RIOT.

I don't get why you should want to run wasm inside RIOT, when you can just compile the source code for the desired architecture. What is the use-case for this?
_______________________________________________
users mailing list
users@riot-os.org
https://lists.riot-os.org/mailman/listinfo/users

Reply via email to