[HN Gopher] WebVM is a server-less virtual Linux environment run...
       ___________________________________________________________________
        
       WebVM is a server-less virtual Linux environment running client-
       side
        
       Author : sebg
       Score  : 176 points
       Date   : 2024-07-11 20:16 UTC (2 hours ago)
        
 (HTM) web link (webvm.io)
 (TXT) w3m dump (webvm.io)
        
       | fragmede wrote:
       | Networking provided by Tailscale. Clever! Works around some
       | potential issues.
        
         | apignotti wrote:
         | Using Tailscale is the most effective solution for in-browser
         | networking, we wrote at length about the topic some time ago:
         | https://labs.leaningtech.com/blog/webvm-virtual-machine-with...
        
           | saurik wrote:
           | I am really confused by one part of your blog post: it says
           | that you had to embed Lwip as applications don't send/receive
           | IP packets... but you also describe this as x86
           | virtualization running specifically-Linux, and Linux
           | absolutely has its own TCP stack, so I don't understand what
           | Lwip is actually accomplishing here... I would have thought
           | you'd essentially be implemented as a paravirtualized network
           | adapter, but then the article mentions system calls? I guess
           | I just fundamentally don't understand at what level of the
           | stack you have this implemented... did you replace the Linux
           | kernel and reimplement its entire system call layer?
        
             | ncruces wrote:
             | Yes: https://labs.leaningtech.com/cheerpx#cheerpx-
             | versus-v86jslin...
             | 
             | Also, a little below:
             | 
             |  _CheerpX currently focuses on user mode (ring 3), and does
             | not fully emulate the kernel (ring 0). We do, however,
             | implement a subset of the Linux system call interface,
             | which is enough to run most applications._
        
           | cchance wrote:
           | Can we use custom derp/headscale setups? Would be interesting
           | even for use internally then, hell rolling custom versions
           | with preloaded software could also be pretty cool all
           | connected to a corporate headscale/derp.
        
       | matt3210 wrote:
       | root password?
        
         | fragmede wrote:
         | "password", per
         | https://github.com/leaningtech/webvm/blob/main/dockerfiles/d...
        
       | alex14fr wrote:
       | This feels way slower than https://bellard.org/jslinux/
        
         | jedisct1 wrote:
         | Hard to compete with Bellard :)
        
         | nullifidian wrote:
         | I tried compiling mandelbrot.c from benchmarks game and
         | execution on jslinux took 12 seconds, while webvm completed it
         | in 1.2 sec. Host takes 0.03 sec with the same gcc flags.
        
       | apignotti wrote:
       | Hi, Lead Dev of WebVM and CTO of Leaning Technologies here. Happy
       | to answer any questions you might have... potentially in a few
       | hours, it's quite late here :-)
       | 
       | Even better, consider joining our Discord:
       | https://discord.gg/yTNZgySKGa
        
         | debarshri wrote:
         | Hello there, I havent tried webvm yet but looks similar to v86.
         | There were lot of network related challenges working with v86,
         | for eg. You cant do curl, DNS resolution does not work out of
         | the box. How did you address these challenges in webvm. I think
         | it is very interesting and exciting what you guys are building.
        
           | apignotti wrote:
           | We support networking via Tailscale, we wrote a detailed blog
           | post some time ago: https://labs.leaningtech.com/blog/webvm-
           | virtual-machine-with...
        
         | theanonymousone wrote:
         | Hi and thanks for the effort. Is there a roadmap for supporting
         | GUI applications?
        
           | apignotti wrote:
           | Yes, we are working on it right now. The immediate priority
           | is booting a complete desktop environment. Next steps will
           | include 3D graphics.
        
             | mcnesium wrote:
             | What are some use cases for this?
        
               | apignotti wrote:
               | The technology is extremely flexibile, off the top of my
               | head:
               | 
               | * Education (Linux, Programming, Security, ...)
               | 
               | * Live docs for arbitrary languages and binary libraries
               | 
               | * Preservation of historical software and games
               | 
               | * Virtualization of legacy Windows enterprise apps.
               | 
               | * Dev environment for Web IDEs
               | 
               | Just a few examples, the list could go on for long
        
         | bilekas wrote:
         | Hi thanks for taking part! I have probably very silly questions
         | but why?
         | 
         | What are the use cases you Invision?
         | 
         | Last but not least, an IRC server/channel in lieu of discord?
         | I'm stuck in my ways!
         | 
         | Nice work too, I hope this doesn't come across as flippant.
         | 
         | EDIT: Side note, I opened vi and escape is.. well maybe a
         | browser issue but 'cant exit vi' .. Never thought id say that
         | again
        
           | jgraham20 wrote:
           | May it is a browser issue. I was able to exit with
           | ':q<Enter>'
        
             | bilekas wrote:
             | Right, I can go to insert mode, but to leave is, tricky. I
             | found going to replace mode and escape worked in FF. I'm
             | sure its a browser issue, I also have vimium so probably a
             | nightmare of hooks!
        
         | d_philla wrote:
         | Hey Alessandro - I'm a huge fan of WebVM + y'all's other work
         | at Leaning Tech.
         | 
         | Curious - is your implementation of how you wrangled lwIP for
         | the networking piece open source? I had previously read the
         | article you linked elsewhere, re: networking, but would love to
         | see the specifics of your approach there.
        
         | koolala wrote:
         | Are you assosicated with Tail Scale? Is Tail Scale like a
         | proxy? Are other options available - is Tail Scale open source
         | too?
         | 
         | edit: Saw your other reply!
         | 
         | https://labs.leaningtech.com/blog/webvm-virtual-machine-with...
        
       | smusamashah wrote:
       | There are a few others
       | 
       | VMs
       | 
       | https://copy.sh/v86/
       | 
       | https://bellard.org/jslinux/
       | 
       | 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)
       | 
       | Mac OS
       | 
       | https://infinitemac.org/
       | (https://blog.persistent.info/2023/03/infinitemac-dot-org.htm...)
       | 
       | https://jamesfriend.com.au/projects/basiliskii/BasiliskII-wo...
       | 
       | https://jamesfriend.com.au/pce-js/pce-js-apps/
        
         | baudaux wrote:
         | https://exaequos.com
        
       | tamimio wrote:
       | What a practical use case of such thing?
        
         | apignotti wrote:
         | (Same answer as a more deeply nested comment below)
         | 
         | The technology is extremely flexibile, off the top of my head:
         | 
         | * Education (Linux, Programming, Security, ...)
         | 
         | * Live docs for arbitrary languages and binary libraries
         | 
         | * Preservation of historical software and games
         | 
         | * Virtualization of legacy Windows enterprise apps.
         | 
         | * Dev environment for Web IDEs
         | 
         | Just a few examples, the list could go on for long
        
           | tamimio wrote:
           | Very interesting, thanks! and good luck on the project.
        
       | ptspts wrote:
       | It doesn't work in my Chrome on Android. The cursor is blinking,
       | nothing happens.
       | 
       | If a browser is not supported, the site should display a specific
       | error message.
        
         | cebert wrote:
         | Works fine for me on Android
        
       | danans wrote:
       | Can it be made to work offline and keep state locally between
       | reloads?
        
       | xyst wrote:
       | Looks like it's broken on mobile
        
         | Zambyte wrote:
         | Works for me in Firefox Focus on Android
        
       | localfirst wrote:
       | can i run a webserver that can talk with the internet and others
       | can call
        
       | sitkack wrote:
       | It even emulates fork!
        
       | supportengineer wrote:
       | $ uptime
       | 
       | Error: /proc must be mounted
        
       ___________________________________________________________________
       (page generated 2024-07-11 23:00 UTC)