4 ms·
I think it's also much faster in practice
by Recursing 2y ago
I think it's also much faster in practice
- 3abiton 2y agoI'm curious, but what's the catch?
- creshal 2y agoThe obvious one is that it is userland-only, you don't get to play around with custom kernels being emulated on the hardware layer.
- TimTheTinker 2y agoBeyond the userland-only limitation, syscall emulation is probably incomplete at best[0], and likely doesn't pass the Linux test suite for the subset of calls that are supported. To get a flavor of the work required when emulating the kernel, you can read up on the work it took Windows developers to emulate Linux syscalls on top of the NT kernel for WSL 1 here: https://learn.microsoft.com/en-us/archive/blogs/wsl/wsl-system-calls https://learn.microsoft.com/en-us/archive/blogs/wsl/wsl-syst... WSL devs eventually abandoned that effort in favor of running the actual kernel in a VM -- that's how WSL 2 is implemented. [0] I'd be surprised if sys_fork actually forks the process using a web worker, for example.
- saagarjha 2y agoThis definitely supports fork; you can see that bash works in it.
- Recursing 2y agoIt's a commercial project and not open-source https://news.ycombinator.com/item?id=40944412 https://news.ycombinator.com/item?id=40944412
- grondilu 2y agoIt doesn't seem so at all from what I've tried.
- Recursing 2y agoWhat have you tried? On webvm.io > $ time python3 -c "max(range(10**7))" real 0m1.558s On https://copy.sh/v86/?profile=archlinux https://copy.sh/v86/?profile=archlinux > # time python3 -c "max(range(10**7))" real 0m5.283s