WebVM 2.0: A complete Linux Desktop Environment in the browser via WebAssembly
labs.leaningtech.com
labs.leaningtech.com
https://jamesfriend.com.au/pce-js/ (https://github.com/jsdf/pce)
https://www.pcjs.org/ (lots of hardware and OSes) (https://github.com/jeffpar/pcjs)
https://infinitemac.org/ (https://blog.persistent.info/2023/03/infinitemac-dot-org.htm...)
https://jamesfriend.com.au/projects/basiliskii/BasiliskII-wo...
Although CheerpX is not yet perfect and additional optimizations are required on its floating point and vector pipelines, it's already fast enough to be practically useful on many use cases, especially when legacy/older binaries are virtualized.
Happy to answer any question.
How's performance?
Can I run any distros on WebVM?
Not all parts of the ISA are as well optimized currently. The codegen for integer operations (the most common by far) is very sophisticated. Floating point and vector operations still have a pretty basic implementation.
WebVM can run any distro, barring bugs in our syscall layer of course :-)
You can add your own Dockerfile and deploy a custom version on GitHub: https://github.com/leaningtech/webvm/?tab=readme-ov-file#for...
Do you have any other industries in mind that you think might be interested in CheerpX?
We think CheerpX would be very useful in education, to provide ready-made environments for students that can be wiped out on demand. We also envision it to be an alternative to remote virtualization (e.g. Citrix) in the enterprise sector.
The virtual disk is quite large (1.5GB) which is necessary to run a full distro but makes pre-downloading for offline mode not possible.
It _could_ work if you let your workload run once and then disconnect, but there is no guarantee.
Installing packages is supported both in the Debian terminal and Alpine desktop.
To be clear, it is possible to build large apps with technologies like TypeScript, with VSCode being probably the standard bearer of this approach, but at Leaning Technologies we don't believe this solution to be viable for everybody.
We strongly believe that more "traditional" languages are required instead to work at scale, especially C++ and Java, and we offer products dedicated to these languages as well: Cheerp and CheerpJ respectively.
Although these languages might not be the most exciting ones, they have a proven track record for delivering large scale applications used by millions of people. Billions of people if the Operating Systems we all use are taken into account.
Thanks to WebAssembly these robust and scalable languages can be used to build Web apps. My own personal metric for the success of WebAssembly is seeing AAA games delivering playable demos as Web apps by cross-compiling (a portion of) the game to the browser.
Separately, one bit of feedback - it's cool that webvm is open source, but I think it's fair to ask you to be upfront that cheerpx itself is not (which is fine!) in the blog post itself where you talk about webvm licensing. If I wasn't already familiar with the wasm emulation space I would have felt rather misled.
64-bit code by its nature consume more memory, each pointer is twice the size, which makes the memory limitation even more pressing for no advantage. Please note, that this is unrelated to the work on WebAssembly Memory64. The issue is not the lack of address space, but rather on the actual memory that can be allocated in practice.
For this public deployment of WebVM we have chosen to limit the maximum memory to 700MBs, which makes the demo work fine on the vast majority of devices, including mobile ones. This said, we do plan to support the 64-bit ISA in the future with the main use case of supporting all the existing docker images available on Docker Hub and similar platforms.
Appreciate your feedback on licensing and we will take it into account, but please notice that this article is specifically about WebVM, that is indeed FOSS. A separate article dedicated to the CheerpX 1.0 release will be published soon, and it will of course be very clear that the latter is proprietary.
On open source - I can only give you feedback as an outside fresh pair of eyes :) I incorrectly interpreted that it was full stack OSS based on the overall blog post 'vibe' and had to deliberately double check because I was aware of cheerpx beforehand. Perhaps it's just me. I look forward to the cheerpx blog post!
Any specific key or character that is not working for you? Or this is a widespread problem?
Simply typing `ls -la` + Enter in the terminal window was a significant challenge, even if I typed slowly. And then I had to press Enter about 5 times until it registered it.
Anyway, click on the "Apps" button on the top menu, then click on "Terminal". An xterm session will open for you.
You could be interested in the terminal-only version of WebVM, based on Debian: https://webvm.io
Thanks
Or to run software that you'd rather not install?
* REPLs for any programming language (Python, ruby, nodejs) for trying out ideas or libraries without installing an environment or when on-the-go
* In education, to let students fiddle with languages or the whole linux system without the friction of local installation, which can break. At the end of the class refresh the tab and you are ready for another session
* Virtualizing legacy native apps that are common in the enterprise sector. With WebVM they can be converted to Web apps. These apps will be mostly Windows-based and our next big project will be to get WINE to work well in WebVM, with an initial focus on gaming.
Fundamentally WebVM brings the convenience of virtualization to lots of users that can not yet benefit from it. Not everybody is able to use docker or VirtualBox on its machine.
In the enterprise sector, remote virtualization via Citrix or similar tech is often used, but this comes at a very high operational costs due to server side execution. With WebVM you can have the security and reproducibility of virtualized environments with completely local execution.
If you can run an (allegedly) complete linux desktop environments that implies you can also run google chrome or firefox, and hence run WebVM.
The terminal-based https://webvm.io has it pre-installed but the graphical demo running Alpine does not.
Luckily, the package manager also works so you can install it with `apk add curl`