eclipse-leda / leda-distro

Eclipse Leda provides a Yocto-based build setup for SDV.EDGE components
https://eclipse-leda.github.io/leda/
Apache License 2.0
14 stars 8 forks source link

Support for WasmEdge WebAssembly #147

Closed mikehaller closed 8 months ago

mikehaller commented 10 months ago

From the wasmedge website: WasmEdge is a lightweight, high-performance, and extensible WebAssembly runtime for cloud-native, edge, and decentralized applications. Main use case for WasmEdge is to safely execute (thirdparty) code as plug-ins in a software product.

This sounds like a matching use case for an SDV Edge runtime platform like Eclipse Leda.

With WasmEdge, Leda would be able to execute workload not only as Docker/OCI containers, but could also support wasm32 packages.

By combining WasmEdge with crun as the low-level container runtime for containerd, Leda would also gain the benefit of lower memory consumption, higher performance and the rest of the stack could remain the same (e.g. Kanto as container orchestrator).

References:

vasilvas99 commented 10 months ago

Related: https://github.com/eclipse-leda/meta-leda/pull/192

vasilvas99 commented 10 months ago

Compiling https://github.com/RustPython/RustPython for the wasm32-wasmi target on a laptop and taking it to the qemu arm64 image, where it's is compiled to a native binary with wasmedge compile --optimize 3 --enable-all rustpython.wasm rustpython leads to a functioning RustPython binary with the standard library included

vasilvas99 commented 8 months ago

Partially resolved with: https://github.com/eclipse-leda/meta-leda/pull/192 as far as Kanto CM allows