2035 came early

2035 came early

tl;dr trynix.dev boots GUI programs now. Try solitaire, GL gears, xeyes, a voice, the weather over curl, or Firefox.

简而言之,trynix.dev 现在可以启动图形界面程序了。你可以尝试运行纸牌游戏、GL gears、xeyes、语音程序、通过 curl 获取天气信息,或者直接运行 Firefox。

I remember watching the talk The Birth & Death of JavaScript by Gary Bernhardt and falling in love with the whimsical yet dreadfully serious unfolding of the story of how JavaScript will come to dominate all software.

我记得曾看过 Gary Bernhardt 的演讲《JavaScript 的诞生与死亡》,并深深迷上了他那既异想天开又极其严肃的叙事方式,讲述了 JavaScript 如何最终统治所有软件。

Others have noted the inevitability of JavaScript’s dominance, so perhaps it was not surprising that Atwood’s Law holds true.

其他人也曾指出 JavaScript 统治地位的必然性,因此 Atwood 定律依然成立也就不足为奇了。

Atwood’s LawAny application that can be written in JavaScript, will eventually be written in JavaScript. — Jeff Atwood, 2009

Atwood 定律:任何可以用 JavaScript 编写的应用程序,最终都将用 JavaScript 编写。—— Jeff Atwood,2009 年

I highly recommend watching the talk if you have not already seen it, but the short and skinny is a lookback from 2035 and how JavaScript came to be the defacto language for all software.

如果你还没看过那场演讲,我强烈推荐你去看看。简单来说,它是从 2035 年回望过去,讲述 JavaScript 如何成为所有软件事实上的标准语言。

In Bernhardt’s retelling of events, the date is worked back from 2035, however unsurprisingly, large language models have rapidly sped up the timeline. What was once perceived to be the end-state at 2035 has arrived years earlier and you can witness it unfolding at trynix.dev.

在 Bernhardt 的叙述中,时间点是从 2035 年倒推的,但不出所料,大型语言模型极大地加快了这一进程。曾经被认为要到 2035 年才会达到的终极状态,如今提前几年就已实现,你可以在 trynix.dev 上见证这一切。

One of the most impressive creations I’ve managed to build leveraging nixpkgs-multiverse is https://trynix.dev.

我利用 nixpkgs-multiverse 构建的最令人印象深刻的作品之一就是 https://trynix.dev。

It still baffles my mind that I can run any Nix package, over 300,000 distinct package versions, straight from my browser. Truly insane capability. I was however a little dismayed at the speed of the QEMU emulation in the browser. It was slow enough that the creation tipped more towards novelty than practicality.

我仍然感到震惊的是,我可以直接在浏览器中运行任何 Nix 软件包,涵盖超过 30 万个不同的版本。这确实是疯狂的能力。然而,我对浏览器中 QEMU 模拟的速度感到有些沮丧。它的运行速度太慢,以至于这个项目更像是一个新奇的玩意儿,而非实用工具。

I woke on November 20th and saw Domen Kožar sharing a single message in our TacoSprint Discord channel: unkernel.dev

11 月 20 日醒来时,我看到 Domen Kožar 在我们的 TacoSprint Discord 频道里分享了一条消息:unkernel.dev。

It was the fast browser Linux experience I had sought to achieve, but with Nix.

这就是我一直试图用 Nix 实现的、在浏览器中快速运行 Linux 的体验。

Aside What is unkernel? It is Linux compiled to WebAssembly, allowing the kernel and system components to run at wasm speed while only user programs are emulated. It was published by Pooya Parsa on November 19th, 2026.

题外话:什么是 unkernel?它是编译为 WebAssembly 的 Linux,允许内核和系统组件以 wasm 的速度运行,同时仅对用户程序进行模拟。它由 Pooya Parsa 于 2026 年 11 月 19 日发布。

In an AI induced manic frenzy, I adopted the new engine along with a slough of long-wished features almost immediately.

在人工智能引发的狂热中,我几乎立即采用了这个新引擎,并加入了一大堆期待已久的功能。

The proof is in the pudding: unkernel delivers remarkable speed improvements over qemu-wasm,11With a very healthy set of patches applied to make it even faster. especially on first runs where kernel work dominates. The new engine is able to deliver 2x to 32x faster performance depending on the workload.22The benchmark page tracks both engines over time, measured through the real page and shell.

事实胜于雄辩:与 qemu-wasm 相比,unkernel 带来了显著的速度提升(通过应用一系列补丁使其更快),特别是在内核工作占主导地位的首次运行中。根据工作负载的不同,新引擎的性能提升了 2 到 32 倍。

JavaScript & WebAssembly nirvana.

JavaScript 与 WebAssembly 的极乐世界。

Amazingly not only does the kernel boot quickly, it also enables networking, full-fledged graphical and audio experiences directly in the browser.

令人惊叹的是,内核不仅启动迅速,还直接在浏览器中实现了网络连接、完整的图形界面和音频体验。

Windows. A program’s Wayland surfaces are composited in the page by wland, and they float over the terminal you started them from.

窗口:程序的 Wayland 界面由 wland 在页面中合成,并悬浮在你启动它们的终端之上。

GL. The VM includes a minimal Mesa build with only the virgl driver, compiled to WebAssembly, rendering through your browser’s WebGL2.

GL:虚拟机包含一个最小化的 Mesa 构建,仅带有 virgl 驱动程序,并编译为 WebAssembly,通过浏览器的 WebGL2 进行渲染。

Sound. The VM has an ALSA sound card, and can play audio through your browser.

声音:虚拟机拥有一个 ALSA 声卡,可以通过你的浏览器播放音频。

Network. curl, git clone and pip install work. Each TCP connection goes over one WebSocket to a Wisp relay.33Thank you to @pi0 for adding trynix.dev to his Wisp relay allow-list.

网络:curl、git clone 和 pip install 均可正常工作。每个 TCP 连接都通过一个 WebSocket 传输到 Wisp 中继。

The best joke in Bernhardt’s talk is a browser running inside another browser: the Windows GIMP under Wine, in Chrome, in Firefox. Of course, I had to try it with trynix. 😈

Bernhardt 演讲中最精彩的笑话是一个浏览器在另一个浏览器中运行:在 Firefox 中的 Chrome 里,通过 Wine 运行 Windows 版 GIMP。当然,我必须用 trynix 尝试一下。😈

Here is Firefox in trynix, and it loading trynix.dev, and then loading Firefox again inside itself.44Don’t get too excited: this took over 4 hours. The inner Firefox needed JIT disabled, the middle one ran without GL, and the outer page used a Wisp relay on my laptop since wisp.unkernel.dev cannot reach itself.

这是在 trynix 中运行的 Firefox,它加载了 trynix.dev,然后又在自身内部再次加载了 Firefox。(别太兴奋:这花了 4 个多小时。内部的 Firefox 需要禁用 JIT,中间的 Firefox 在没有 GL 的情况下运行,而外部页面使用了我笔记本电脑上的 Wisp 中继,因为 wisp.unkernel.dev 无法访问自身。)

Sit and bask in that insanity. That is Firefox, on Linux compiled to WebAssembly, in a Firefox tab, loading the site and then loading Firefox again inside itself. 🤯

静下心来,沉浸在这疯狂之中吧。这就是运行在编译为 WebAssembly 的 Linux 上的 Firefox,它位于一个 Firefox 标签页中,加载了该网站,然后又在自身内部再次加载了 Firefox。🤯