5 ms·
Hello HN, author of the post here, happy to answer questions.
by apignotti 5y ago
Hello HN, author of the post here, happy to answer questions.
- brian_herman 5y agoHow does this compare to https://bellard.org/jslinux/tech.html https://bellard.org/jslinux/tech.html? https://bellard.org/jslinux/ https://bellard.org/jslinux/
- easrng 5y agoAnd also https://copy.sh/v86 https://copy.sh/v86
- remisharrock 5y agoAnd jor1k (JavaScript openrisc processor emulator) : well, they emulate processors (x86, openrisc..) in JavaScript while WebVM execute (transpiled?) code in webassembly
- g3 5y agov86 also recompiles machine code to web assembly. The main difference is that v86 is a hobby project (of which I'm the original author, by the way), with much fewer contributors and no (known) commercial users, and is much less sophisticated than this project. On the other hand, v86 is open source, so you could make it sophisticated if you wanted to :-) I'm not sure what exactly cheerps is used for; v86 is mostly used to demo operating systems (mostly hobby and vintage). We recently got SerenityOS to run: http://copy.sh/v86/?profile=serenity http://copy.sh/v86/?profile=serenity
- apignotti 5y agoPerf. Our JIT is extremely advanced. Of course different workloads will behave differently, but you are welcome to try multiple payloads and see for yourselves.
- mhh__ 5y agoWhat constitutes advanced?
- easrng 5y agoIs there support for loopback networking (for IPC)? Is there a way to translate HTTP(S) requests to `fetch` requests? How difficult would it be to port a Go app that uses https://github.com/pion/webrtc https://github.com/pion/webrtc to use the browser's native WebRTC?
- apignotti 5y agoHTTP request could be intercepted, but due to CORS they would most likely not succeed. I have not studied the WebRTC protocol in detail but it might be possible.
- habitue 5y agoCan you run containers in webvm?
- deleted 5y ago[deleted]
- remisharrock 5y agoWill you open source your code one day and if no, why not?
- xmly 5y agoHow about the network stack? Is the VM can talk with other VMs from other browsers.
- apignotti 5y agoNot in the current implementation, but absolutely possible with WebRTC. We have done something equivalent some time ago: https://medium.com/p/29fbbc62c5ca https://medium.com/p/29fbbc62c5ca
- tlarkworthy 5y agoI have REDIS driver working in web using websockify bridges (and there are a few other options) https://observablehq.com/@tomlarkworthy/redis https://observablehq.com/@tomlarkworthy/redis
- Klasiaster 5y agoSo, this is a reimplementation of the Linux ABI and no Linux kernel source is involved, right?
- apignotti 5y agoThat's correct.
- Klasiaster 5y agoHave you tried compiling Linux as User Mode Linux with emscripten? I imagine something like this https://github.com/nabla-containers/nabla-linux https://github.com/nabla-containers/nabla-linux would run on wasm, too?
- apignotti 5y agoWell, User Mode Linux would still require an underlying Linux ABI, for example mmap to implement pagination. With sufficient work it might be possible to actually run UM Linux _on top_ of CheerpX / WebVM. Implementing the Linux ABI ourselves gives us the opportunity of a tighter integration with the Web platform anyway.
- btdmaster 5y agoIt seems to not work with my eager block settings. It works with a fresh Firefox profile though, so it's not clear what the issue exactly is though. I know for sure that the ext2 is never actually downloaded (0 byte response) and when I try to check anything in DevTools cxcore.wasm triggers a pause on debugger statement, which spikes the CPU. Any chance there could be a version with all the assets in one thing (say, GitHub Pages)?
- thekozmo 5y agoImpressive stuff! Worth to try to run the OSv unikernel (one of my babies) in it.
- arturventura 5y agoHey dude, I've been screwing around implementing plan9 semantics in a OS like system for the browser (https://github.com/intigos/possimpible https://github.com/intigos/possimpible). I'm interested in using a x86 emulator inside a webwoker that I'm using for processes so I can run x86 code. How hard is something like this? Can you give me some pointers on how to start working on this? Thanks!
- PeterisP 5y agoIs this tech a reasonable way for cross-platform emulation, e.g. a x86 VM running on a browser on ARM hardware like the new Apple chips? In essence, for this approach, would the x86-on-x86 performance hit be similar or very different than the x86-on-ARM performance hit?
- apignotti 5y agoThe actual host hardware does not matter, neither in terms of support or performance, theoretically. We currently optimize the codegen for Chrome/V8 on x86.
- bonzini 5y agoWhat performance bottlenecks are there that can still be improved? Right now I see a ~6x slowdown on small-code benchmarks like sieve, but it goes up to 50x or more for large code like GCC. For QEMU it's roughly 1.6x and 2-3x respectively, so it seems like your JIT is slower than QEMU's.