任意 Nix 包,浏览器中实时运行

Simon Willison's Blog 工具

摘要

文章介绍了 trynix,一个基于 WebAssembly 的工具,可在浏览器中运行过去13年内的任何 Nix 包,并重点介绍了一个 GitHub Action,用于交互式地启动拉取请求。

暂无内容
查看原文
查看缓存全文

缓存时间: 2026/09/11 02:14

# 任何 Nix 软件包,在浏览器中运行 来源:https://simonwillison.net/2026/Sep/10/trynix/ 2026年9月10日 - 链接博客 **任何 Nix 软件包,在浏览器中运行 (https://fzakaria.com/2026/09/04/any-nix-package-live-in-your-browser)**(via (https://lobste.rs/s/7lii0g/review_pull_request_by_booting_it)) Farid Zakaria 称此为他在 Nix 方面的 "*杰作*",我深以为然。 trynix.dev (https://trynix.dev/) 提供了一个完全通过 WebAssembly 在浏览器中运行的、基于 qemu-wasm (https://github.com/ktock/qemu-wasm) 的 x86_64 Linux 虚拟机。该虚拟机可以使用过去13年中的 *任何 Nix 软件包* 启动。它们可以通过 URL 寻址,因此你可以导航到此页面: https://trynix.dev/?pkg=python3%403.6.2 然后点击 "Load",即可获得一个针对运行 2017 年发布的 Python 3.6.2 的虚拟机的交互式 shell。 Farid 在此基础上构建了各种巧妙的东西。一个最近的例子:通过启动来审查拉取请求 (https://fzakaria.com/2026/09/09/review-a-pull-request-by-booting-it) 介绍了 trynix-preview (https://github.com/marketplace/actions/trynix-preview),其描述如下: > 一个 GitHub Action,它在拉取请求中留下一个链接,让你可以通过 https://trynix.dev/ 在浏览器中启动该 PR 的构建。无需服务器,仅需浏览器。

相似文章

Any Nix package, live in your browser

Lobsters Hottest

trynix.dev is a browser-based runner that boots a Linux VM in WebAssembly to let users execute any historical Nix package instantly without local installation. It can pull binaries from the public Nix cache, Cachix, or any CORS-enabled store, enabling over 310,000 nixpkgs versions to run directly in a browser tab.

通过启动来审查拉取请求

Lobsters Hottest

trynix-preview 是一个 GitHub Action,允许审查员在浏览器中直接启动拉取请求的构建以进行测试和反馈,使用 Nix 和 Cachix 而无需服务器或克隆。