trynix.dev: any Nix package right in your browser

Translated by a model; the original is in Russian.

· Linux and open source
Farid Zakaria has launched a Linux virtual machine that runs entirely in the browser via WebAssembly — and it can load any Nix package from the past 13 years.

cover.svg

Developer Farid Zakaria has unveiled a project he himself calls his “magnum opus” in working with Nix. The service trynix.dev is an x86_64 Linux virtual machine that runs entirely inside the browser. Behind the scenes, qemu-wasm — compiled to WebAssembly — does the heavy lifting: no servers, just a browser tab.

The key feature is that this machine can load any package from the Nix ecosystem going back thirteen years. What's more, packages are addressed straight through the URL. For instance, by following a link like https://trynix.dev/?pkg=python3@3.6.2 and clicking “Load,” you get an interactive shell with Python 3.6.2 — the very version that came out back in 2017.

For developers, it's a convenient way to instantly check how an old version of a tool behaves without setting up an environment locally or spinning up containers. Just share the link, and the other person will open exactly the same thing on their end.

Reviews right in the browser

On this foundation, Zakaria is building more practical things too. One recent example is trynix-preview: a GitHub Action that leaves a comment on a pull request with a link. Through it, the build from that PR can be loaded and run right in the browser via trynix.dev.

The idea is winning in its simplicity: to see how a proposed change behaves, a reviewer doesn't need to clone the repository, build the code, and configure dependencies. They open the link — and work with a live build. As the author himself succinctly puts it, “no servers, just browsers.”

The project vividly demonstrates just how far the combination of WebAssembly and reproducible Nix builds has come: full-fledged Linux emulation with access to a vast archive of packages now fits in a single tab.


Source: Simon Willison

Comments

Sign in, to comment.

  • No comments yet.