Settings

Theme

Show HN: Vpod – Tiny Linux sandbox running in WASM

github.com

12 points by mavdol04 21 days ago · 5 comments · 1 min read

Reader

Hi HN,

I spent the last few months reading the RISC‑V specification to build the lightest possible sandboxes. The idea behind a vpod is to quickly spin up a Linux sandbox from snapshots (Alpine by default) without any setup or subsystem required.

The trade-off for portability and security is raw CPU speed. So we don't expect it to match native workloads with Python or pip, for example.

More info is in the README https://github.com/capsulerun/vpod

Happy to answer any questions!

spankalee 20 days ago

Do you think that once GCC gets a working Wasm backend[1], that it might be possible to build Linux for Wasm directly and skip the RISC-V VM?

[1]: https://www.phoronix.com/news/GCC-Steering-WebAssembly

  • mavdol04OP 20 days ago

    With RISC‑V emulation we get the virtual hardware components we need to boot Linux like MMU, registers etc. So a GCC WASM backend could definitely help, but I'm not sure it could replace the whole emulation layer.

clapthewind 20 days ago

So we can run this on a browser? a demo on the github page would be great. combine it with an extension to support networking, and you have a winner.

  • mavdol04OP 20 days ago

    It doesn't have browser support yet because it's WASI-based, so there are a few more steps compared to Emscripten (two different ways to build for WebAssembly). But networking is supposed to work, did you have trouble with it?

    • clapthewind 19 days ago

      I didn't try it. Given jslinux exists, and works, i suspect WASM based linux will be faster and more streamlined.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection