v0.4-preview #251
progrium
announced in
Announcements
Replies: 1 comment 2 replies
-
|
The examples at https://wanix.dev work great and are very instructive. Great work! I tried running a few of the examples on observablehq at: https://new.observablehq.com/@btheado/hello-wanix, but none of them work for me yet. I documented the issues I'm seeing on that page. I haven't done any troubleshooting yet, but if you want to try it for yourself, click the pencil icon on the bottom right to make the cells editable. The first example I left commented out because it renders the page unusable. If you uncomment and make your page unusable, then just refresh the page to recover. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Composable compute in HTML
Wanix Elements are web components that let you declare and use filesystems, tasks, VMs, terminals, and even VS Code, using HTML and JavaScript. Everything you need to build a Unix-style compute environment from scratch that runs sandboxed in the browser. Not only can it run Wasm and JS, but x86 Linux executables and more. This means it can run many development toolchains. It is the easiest way to:
For the personal software revolution, Wanix gives you everything to build your own OS in the browser in a way that interops with and makes composable other operating systems the same way Plan 9 did. The creator of Unix once said the best operating system in the world is Plan 9. Wanix takes the ideas of Plan 9 and brings them to the web as new primitives for general compute.
In this example, without needing any JavaScript, we create a namespace, allocate a new ramfs as the root, download the rc shell, write an inline shell script, set up a task to run the shell script with rc, and create a terminal wired up to the task to interact with it. Using just a few tags we got a terminal on the page with "Hello world from Wanix!" printed out:
This is a huge preview release. The star could be the HTML custom elements, but there is also a lot more to check out below. In the year since the last release, we've also launched an application developed on Wanix called Apptron. Those developments went back into Wanix and have been accumulating for this release.
For a bunch of interactive examples, you can also check out our newly relaunched website.
Elements
Wanix Elements are the easiest way to set up and use Wanix systems. You declaratively describe the system using HTML and you're done! The core Wanix elements all map to the core Wanix primitives: namespaces, tasks, terminals, VMs, and binds:
<wanix-task><wanix-bind><wanix-term><wanix-vm><wanix-namespace><wanix-workbench>Workbench is an optional addition (see below). Workbench and
<wanix-term>are the only elements that are visually rendered.You can use an explicit namespace and wrap your system in
<wanix-namespace>:For simple systems, you can also use an implicit namespace by using task, term, vm, or workbench as the outer namespace element:
You can choose which element (besides
<wanix-bind>) is the root, though typically it will be the visual element. This form is the equivalent of the two above as well:Workbench
Wanix Workbench is a fully customizable VS Code interface as a web component. It can be used as a simple editor, file explorer, terminal, full IDE, or something completely different via extensions. It's never been easier to deploy a customized VS Code:
Wanix Workbench is part of "extras" because it requires a directory to be served with Code workbench assets and the bridge extension. This is literally just serving the
workbenchdirectory in the repo after building, but is also available over CDN (see below).Extras
Optional components and support files are now distributed as "extras":
rc shell
Wanix now has its own minimal shell called rc (run command). Wanix previously depended on a minimal Busybox Linux VM just for a shell. Now this standalone Wasm executable can be dropped in as needed. Like Busybox, it's actually a multi-call executable with a whole Unix userland (cat, echo, cp, etc) including a Bash-like shell as one of the commands it embeds.
It's very a much a work in progress, so it may be somewhat broken, but is also a great place to start hacking on Wanix. It's also intended to be a usable shell and userland for non-Wasm platforms.
Linux system
The
rcsub-project has replacedshellas the default shell for Wanix and no longer uses a Linux VM. However, it was nice to have a "Wanix ready" Linux. Now in extras we havewanix-linux.tgz, which is Alpine Linux, plus some utilities, and a smaller Linux kernel. Wanix can run other custom Linux systems, but this gives you something to get going with Linux quicker.You can simply bind the system tarball from CDN:
v86 assets
Support for v86 now requires binding a tarball of assets from extras to
#vm/v86, which works fine via CDN:Workbench assets
Support for
<wanix-workbench>requires serving the Wanix Workbench assets and telling the element where they are.We recommend serving them yourself to avoid cross-domain issues, but in some cases you can point to the CDN:
Project Layout
The project has been flattened out so you can see most of the project from the top level. Be sure to look in examples.
Notable Additions
Notable Changes
#web/vmhas moved to#vm#ramfsis now allocated by binding from#ramfs/newContributions
New Contributors
Full Changelog: v0.3...v0.4-preview
This discussion was created from the release v0.4-preview.
Beta Was this translation helpful? Give feedback.
All reactions