4 ms·
Hermit: Actually Portable WASM
- nilslice 3y agoi got ubuntu container transpiled to wasm running in a hermit on Windows. wat? https://github.com/dylibso/hermit/releases/download/v0.1.0/ubuntu.hermit.com https://github.com/dylibso/hermit/releases/download/v0.1.0/u...
- gnulinux 3y agoThis is great (I love WebAssembly). I just wish there was a way to run WebAssembly somewhat consistently between browser, linux/win/osx and Android. It seems like this fixes the browser and linux/win/osx part but no Android. Frameworks like emilk (i.e. egui with eframe) can do all three but packaging is rather complicated. This solves the packaging aspect with no solution to Android. Eh, maybe one day we will get there.
- G4Vi 3y agoIt would be cool to package Wasm for every platform easily. You could make a hermit runner for android that loads the module and wasi configuration from the hermit, but uses its own runtime instead of the one embedded in the hermit. Excluding the Wasm runtime, the hermit's runner or hermit base is under 400 LOC: https://github.com/dylibso/hermit/blob/1f6f51d0d6b3941c9616f2517c13881ea5d2ffdc/src/hermit-base.c https://github.com/dylibso/hermit/blob/1f6f51d0d6b3941c9616f... . Instead of reading the configuration and module from /zip you would use zip decoder on the hermit you want to run.
- syrusakbary 3y agoIt would be nice to see innovation in the Wasm space rather than copying products that already existed before. Wasmer already launched the exact same product one year ago (Aug 2022): https://wasmer.io/posts/wasm-as-universal-binary-format-part-1-native-executables https://wasmer.io/posts/wasm-as-universal-binary-format-part... (BTW, way more performant than the Hermit copy). The only thing that Hermit does is using APE (Actually Portable Format), which we also analyzed on the second post of the series: https://wasmer.io/posts/wasm-as-universal-binary-format-part-2-wapm https://wasmer.io/posts/wasm-as-universal-binary-format-part..., also published a year ago. On one hand, both ape and Wasmer rely on a “universal binary interface” to interact universally with the Operating System: Cosmopolitan (as a universal libc POSIX interface) in the case of ape, and WASI in the case of Wasmer.
- nilslice 3y agoAh Syrus, good to hear from you as always. You know, people like to have options :) As far as options go, I typically like to use what works. Some other options just tend to not work well.