WebVM
约 2 分钟阅读
标签:WASM
- container2wasm/container2wasmGitHubcontainer2wasm/container2wasm
- c2w-net-proxy
- RISC-V (riscv64): Recommended, faster emulation with TinyEMU
- 单线程
- x86_64: Slower, uses Bochs emulator
- QEMU Mode:
--to-jsfor Emscripten output with JIT (larger but faster)- 支持 MTTCG
- bjorn3/browser_wasi_shimGitHubbjorn3/browser_wasi_shim
- mame/xterm-ptyGitHubmame/xterm-pty
- containers/gvisor-tap-vsockGitHubcontainers/gvisor-tap-vsock
- joelseverin/linux-wasmGitHubjoelseverin/linux-wasm
- fast, buggy
- 把 linux 编译为 wasm
- 不是 emu 或者 vm
- binfmt_wasm
- HN #45783074Hacker NewsHacker News #45783074Hacker News
- webassembly/wasi-libcGitHubwebassembly/wasi-libc
- cheerpx
- cheerpx.io
- 虚拟化引擎
- 闭源
- x86 -> wasm jit compiler
- virtual block fs
- Linux syscall emulator
- Free
- ❌ Self-Hosting not allowed
- ❌ OEM/Redistribution
- Small
- £100 per developer per month
- WebVM: leaningtech/webvmGitHubleaningtech/webvmcontainer2wasm/container2wasm · c2w-net-proxy · RISC-V (riscv64): Recommended, faster emulation with TinyEMU · 单线程 · x8664: Slower, uses Bochs emulator笔记:WebVM
- copy/v86GitHubcopy/v86
- 32bits x86
- 支持很多老的架构
- Rust, WASM
- 比 TinyEMU 快
- x86_64 copy/v86#133GitHub Issuecopy/v86#133
- TinyEMU
- riscv64, x86
- 解释器, 10k LOC
- ptitSeb/box64GitHubptitSeb/box64
- MIT, C
- Linux Userspace x86_64 Emulator with a twist, targeted at ARM64, RV64 and LoongArch Linux devices
- Bochs
- x86_64
- QEMU TCG JIT
- QEMU WASM ktock/qemu-wasmGitHubktock/qemu-wasm
- userland-run/nanoGitHubuserland-run/nano
- tiny RISC-V user-mode Linux interpreter
- nodejs+busybox 130MB
# 简单性能测试
# 精度为 1000 位小数
# 4*arctan(1) -> π
time sh -c 'echo "scale=1000; 4*a(1)" | bc -lq' > /dev/null
# linux-wasm 不支持 vfork
date +%s
echo "scale=1000; 4*a(1)" | bc -lq > /dev/null
date +%s| env/scale | 500 | 1000 | 5000 |
|---|---|---|---|
| macOS M2 MAX | 0.01s | 0.75s | |
| alpine riscv64 TinyEMU | 22s | ||
| alpine x86 v86 | 23s | ||
| linux-wasm | 1s |
| abbr. | stand for | cn |
|---|---|---|
| COOP | Cross-Origin-Opener-Policy | 跨源开放者政策 |
| COEP | Cross-Origin-Embedder-Policy | 跨源嵌入者政策 |
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corpc2w
- c2w-net-proxy
- browser fetch
- gvisor-tap-vsock
- c2w-net
- delegate websocket
- gvisor-tap-vsock
关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub12 条
- bjorn3/browser_wasi_shimgithub.com/bjorn3/browser_wasi_shim
- container2wasm/container2wasmgithub.com/container2wasm/container2wasm
- containers/gvisor-tap-vsockgithub.com/containers/gvisor-tap-vsock
- copy/v86github.com/copy/v86
- copy/v86#133github.com/copy/v86/issues/133
- joelseverin/linux-wasmgithub.com/joelseverin/linux-wasm
- ktock/qemu-wasmgithub.com/ktock/qemu-wasm
- leaningtech/webvmgithub.com/leaningtech/webvm
- mame/xterm-ptygithub.com/mame/xterm-pty
- ptitSeb/box64github.com/ptitSeb/box64
- userland-run/nanogithub.com/userland-run/nano
- webassembly/wasi-libcgithub.com/webassembly/wasi-libc
Hacker News1 条
- Hacker News #45783074HN #45783074
其他外链1 条
- cheerpx.iocheerpx.io/