env86 devlog #1085
Replies: 6 comments 3 replies
-
Wow, looking forward to new updates! |
Beta Was this translation helpful? Give feedback.
-
That looks very cool, I can't wait to play around with it. |
Beta Was this translation helpful? Give feedback.
-
Just dropped it into a public repo: https://github.com/progrium/env86 It's still very early (Windows and Linux users might not get a console window, please submit an issue if so), but it can be used to create images, boot VMs from the command line, provide a network relay, save changes to an image, and prepare static files to publish the VM to the web. Let me know (issues or posting here) if you run into anything! |
Beta Was this translation helpful? Give feedback.
-
This is just a quick update rant covering some recent developments: I originally sketched out env86 about 6 weeks ago and I'm pretty happy to finally have it implemented as I imagined. It can create Linux images from Docker or a root FS directory, now automatically detecting if there is a kernel+initrd to set its default configuration to use that. Though kind of a cool thing is that I embed a Linux kernel and initrd in env86 to use when one is not provided for an image. I also just started a default guest service that will be done by 0.2. This guest service executable is also embedded in the env86 executable, so it can add it to new images using Anyway, that's future stuff, but right now there's already a bunch of things you may have missed. Besides the basic create/boot/prepare workflow documented in the readme, and working with the network stack, there are a couple of neat things I've added since. Booting a VM by default opens a window to show a canvas element for the screen. This is the main source of cross platform issues as its based on a library I've made to make webview windows and other Electron-y desktop API things available in Go. But these currently use CGO, which makes compiling slow and means it has to link against libraries that requires their headers to be available when building (making Linux in particular annoying to build since it has a few dev package dependencies). This will eventually go away as I port these to purego, which will avoid CGO. However, the important thing is that even if you don't show the console window, it still creates a hidden webview window to run v86 in since it has a lot of JS that is dependent on a browser environment. I wanted to be able to use env86 to build images on GitHub Actions, but you don't normally have a desktop environment for this to work. So I added support for Chrome Debug Protocol as an alternative way to run v86 in boot. This means you can just have Chrome installed and it will run a headless Chrome. I made a Docker container (on Docker Hub as One thing I had to do for Apptron is chunk the initial state. Booting a tiny Alpine image to a prompt produces a ~90MB state file. Even compressed this is too large for files to be served from CloudFlare Pages (and probably other CDNs). At first I served it from the network gateway running on Heroku, but this ended up being pretty slow. So I split the initial state into 10MB parts, which not only lets them live on the CDN, but I can fetch them in parallel before assembling into a single arraybuffer to give v86. Originally I worked this out for Apptron, but I added it to env86 so that when you The last thing for this update that I just added is a mechanism that lets me use env86 to script making initial state instead of using a Node.js script. So boot has a A few people have helped me work out the Linux experience, which like I mentioned before will for now require your distro equivalent of these Alpine packages: However, I've yet to see how badly this breaks on Windows. So if there are Windows users willing to work with Go and Docker, I'd love to see if you can build and run env86. Getting it to run, eventually with no dependencies, across platforms will make it ... an interesting alternative to Docker for certain use cases. |
Beta Was this translation helpful? Give feedback.
-
There is now a guest service that you can add to images that opens up a larger API for working with the VM. It lets you:
This is exposed mostly via the There will be another mechanism for mounting in the guest, which uses FUSE and works by implementing a few RPC methods. This can be used as a simpler way to implement virtual filesystems, but is mainly so we can wrap the browser Filesystem API so when running in the browser we can mount user host directories (no 9P necessary). |
Beta Was this translation helpful? Give feedback.
-
Here is the last update for a while but it's in video form. I'm not going away just focusing on other projects now that its in a good enough state for me, but if anybody has questions or anything let me know! |
Beta Was this translation helpful? Give feedback.
-
I'm working on a tool to help with making v86 images called env86. Right now it lets you run v86 images without setting up a webpage and even get into a TTY from the shell. It also has my virtual network stack so you don't need to run a relay. It can also be used as a relay alternative that's cross platform.
Here is a full demo of it so far, but I have a lot more planned. I'll post updates here. Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions