<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans">
<title>Nabi 动态</title>
<id>https://nabi-lang.org/zh-hans/news</id>
<link rel="self" href="https://nabi-lang.org/zh-hans/news/feed.xml"/>
<link rel="alternate" type="text/html" href="https://nabi-lang.org/zh-hans/news"/>
<updated>2026-11-22T00:00:00Z</updated>
<author><name>DaminStudio</name></author>
<entry>
<title>Nabi 0.1.3：nabi audit</title>
<id>https://nabi-lang.org/zh-hans/news/nabi-0.1.3</id>
<link rel="alternate" type="text/html" href="https://nabi-lang.org/zh-hans/news/nabi-0.1.3"/>
<updated>2026-11-22T00:00:00Z</updated>
<content type="html">&lt;h1 id=&quot;nabi-013nabi-audit&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#nabi-013nabi-audit&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;Nabi 0.1.3：nabi audit&lt;/h1&gt;
&lt;div class=&quot;lead-sm&quot;&gt;Nabi 0.1.3 新增了 &lt;code&gt;nabi audit&lt;/code&gt;，用包注册表的安全公告检查项目锁定的包。用 &lt;code&gt;nabi toolchain update&lt;/code&gt; 更新，或从&lt;a href=&quot;../download.html&quot;&gt;下载页面&lt;/a&gt;重新安装。&lt;/div&gt;
&lt;h2 id=&quot;检查项目&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#检查项目&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;检查项目&lt;/h2&gt;
&lt;div class=&quot;code cb&quot;&gt;&lt;div class=&quot;cb-h&quot;&gt;&lt;span class=&quot;t-label&quot;&gt;sh&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cb-body&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;nabi audit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;nabi audit&lt;/code&gt; 读取 &lt;code&gt;nabi.lock&lt;/code&gt;，用 &lt;a href=&quot;https://packages.nabi-lang.org/zh-hans/advisories&quot;&gt;packages.nabi-lang.org/advisories&lt;/a&gt; 上发布的安全公告检查其中的每个注册表包。对每条适用的公告，它会给出公告 ID、摘要、严重程度，以及应当更新到的版本，例如 &lt;code&gt;nabi update json&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;没有受影响的包时以 0 退出，有受影响的包时以 1 退出，无法检查时以 2 退出，因此可以在 CI 中把它当作关卡：&lt;/p&gt;
&lt;div class=&quot;code cb&quot;&gt;&lt;div class=&quot;cb-h&quot;&gt;&lt;span class=&quot;t-label&quot;&gt;yaml&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cb-body&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;- run: nabi audit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;--json&lt;/code&gt; 输出机器可读的记录，&lt;code&gt;--ignore &amp;lt;id&amp;gt;&lt;/code&gt; 跳过你已阅读并接受的公告，&lt;code&gt;--offline&lt;/code&gt; 只使用缓存的列表。列表只获取一次，保留一小时。路径依赖和 git 依赖不在检查范围内，输出会列出跳过了哪些。&lt;/p&gt;
&lt;h2 id=&quot;注册表上的安全公告&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#注册表上的安全公告&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;注册表上的安全公告&lt;/h2&gt;
&lt;p&gt;安全公告采用其他生态系统也在用的 &lt;a href=&quot;https://ossf.github.io/osv-schema/&quot;&gt;OSV&lt;/a&gt; 格式。每条公告都有自己的页面，受影响的版本会显示横幅，完整列表可以通过 &lt;code&gt;/api/v1/advisories?format=json&lt;/code&gt; API 获取。发现包中的漏洞时，请先告知其所有者；如果是注册表或工具链的漏洞，请发邮件至 &lt;a href=&quot;mailto:security@nabi-lang.org&quot;&gt;security@nabi-lang.org&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;详情见指南中的&lt;a href=&quot;https://docs.nabi-lang.org/latest/zh-hans/learn/packages/04-security-advisories&quot;&gt;安全公告&lt;/a&gt;一页，完整的变更列表见&lt;a href=&quot;https://github.com/nabi-lang/nabi/releases/tag/v0.1.3&quot;&gt;发布说明&lt;/a&gt;。&lt;/p&gt;
</content>
</entry>
<entry>
<title>Nabi 0.1.1 和 0.1.2</title>
<id>https://nabi-lang.org/zh-hans/news/nabi-0.1.2</id>
<link rel="alternate" type="text/html" href="https://nabi-lang.org/zh-hans/news/nabi-0.1.2"/>
<updated>2026-11-22T00:00:00Z</updated>
<content type="html">&lt;h1 id=&quot;nabi-011-和-012&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#nabi-011-和-012&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;Nabi 0.1.1 和 0.1.2&lt;/h1&gt;
&lt;div class=&quot;lead-sm&quot;&gt;0.1 系列的两个修复版本。现在每个包只能看到自己的依赖，类型经过 &lt;code&gt;any&lt;/code&gt; 的包（如 &lt;code&gt;spatial&lt;/code&gt; 和 &lt;code&gt;sparse&lt;/code&gt;）再次可以作为依赖构建。用 &lt;code&gt;nabi toolchain update&lt;/code&gt; 更新，或从&lt;a href=&quot;../download.html&quot;&gt;下载页面&lt;/a&gt;重新安装。&lt;/div&gt;
&lt;h2 id=&quot;每个包只能看到自己的依赖011&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#每个包只能看到自己的依赖011&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;每个包只能看到自己的依赖（0.1.1）&lt;/h2&gt;
&lt;p&gt;一个包中不带前缀的 &lt;code&gt;x::&lt;/code&gt; 路径只能访问它所依赖的包，并使用它为这些包所起的名字。此前，这样的路径可能解析到构建图中的任何包，因此 &lt;code&gt;table&lt;/code&gt; 0.1.0 与 &lt;code&gt;csv&lt;/code&gt; 包同时存在时无法构建。&lt;/p&gt;
&lt;p&gt;当一个依赖和一个子模块同名时，&lt;code&gt;x::&lt;/code&gt; 现在会报错，错误信息会列出两者，并说明应该怎么写：依赖写作 &lt;code&gt;::x::..&lt;/code&gt;，模块写作 &lt;code&gt;pkg::x::..&lt;/code&gt;。&lt;a href=&quot;https://docs.nabi-lang.org/latest/zh-hans/spec&quot;&gt;语言规范的路径一章&lt;/a&gt;和指南中关于模块和包的一章完整说明了这条规则。&lt;/p&gt;
&lt;p&gt;0.1.1 还附带了更新后的官方包：&lt;code&gt;table&lt;/code&gt; 0.1.3，以及 &lt;code&gt;autodiff&lt;/code&gt;、&lt;code&gt;linalg&lt;/code&gt;、&lt;code&gt;ode&lt;/code&gt;、&lt;code&gt;optimize&lt;/code&gt;、&lt;code&gt;signal&lt;/code&gt;、&lt;code&gt;sparse&lt;/code&gt; 和 &lt;code&gt;stats&lt;/code&gt; 0.1.1，它们的教程已移入 &lt;a href=&quot;https://docs.nabi-lang.org/packages&quot;&gt;docs.nabi-lang.org/packages&lt;/a&gt; 上各自的 API 文档。&lt;/p&gt;
&lt;h2 id=&quot;使用-any-的包再次可以构建012&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#使用-any-的包再次可以构建012&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;使用 &lt;code&gt;any&lt;/code&gt; 的包再次可以构建（0.1.2）&lt;/h2&gt;
&lt;p&gt;0.1.1 无法构建依赖 &lt;code&gt;spatial&lt;/code&gt; 的项目，或同时依赖 &lt;code&gt;spatial&lt;/code&gt; 和 &lt;code&gt;sparse&lt;/code&gt; 的项目。现在，&lt;code&gt;nabic&lt;/code&gt; 为存放在 &lt;code&gt;any&lt;/code&gt; 中的包类型生成的代码，会按该包所看到的名字来命名这些类型；一个包也不再为它不依赖的包携带这类代码。&lt;/p&gt;
&lt;p&gt;另外修复了：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;any ::dep::Trait&lt;/code&gt; 再次被解析为 &lt;code&gt;any&lt;/code&gt; 约束；对于重命名的依赖，&lt;code&gt;any al::Trait&lt;/code&gt; 之前会失败。
&lt;/li&gt;
&lt;li&gt;只改变包能看到哪些依赖时，现在会重新构建该包；此前构建会复用过时的结果。
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;完整列表见 &lt;a href=&quot;https://github.com/nabi-lang/nabi/releases/tag/v0.1.1&quot;&gt;0.1.1&lt;/a&gt; 和 &lt;a href=&quot;https://github.com/nabi-lang/nabi/releases/tag/v0.1.2&quot;&gt;0.1.2&lt;/a&gt; 的发布说明。&lt;/p&gt;
</content>
</entry>
<entry>
<title>Nabi 0.1.0 发布</title>
<id>https://nabi-lang.org/zh-hans/news/nabi-0.1.0</id>
<link rel="alternate" type="text/html" href="https://nabi-lang.org/zh-hans/news/nabi-0.1.0"/>
<updated>2026-11-22T00:00:00Z</updated>
<content type="html">&lt;h1 id=&quot;nabi-010-发布&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#nabi-010-发布&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;Nabi 0.1.0 发布&lt;/h1&gt;
&lt;div class=&quot;lead-sm&quot;&gt;Nabi 0.1.0 是 Nabi 的第一个版本：一门编译型语言、它的工具链、一个包注册表，以及围绕它们的网站。本文介绍其中包含什么、在哪些平台上运行、哪些尚未完成，以及如何参与。&lt;/div&gt;
&lt;h2 id=&quot;nabi-是什么&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#nabi-是什么&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;Nabi 是什么&lt;/h2&gt;
&lt;p&gt;Nabi 是一门静态类型的编译型语言，具有封闭的和类型，没有 null，错误写在函数签名中。程序是带有垃圾回收运行时的原生可执行文件（或 WebAssembly 模块）。其设计遵循&lt;a href=&quot;https://docs.nabi-lang.org/latest/zh-hans/spec&quot;&gt;语言规范&lt;/a&gt;中的两条原则：精简的核心配上丰富的库，以及清晰的规则，并在规则之内给用户自由。类型、分派、内存模型和求值顺序由语言一次性确定；库的设计、领域建模和代码结构则交给你。&lt;/p&gt;
&lt;p&gt;第一个程序：&lt;/p&gt;
&lt;div class=&quot;code cb&quot;&gt;&lt;div class=&quot;cb-h&quot;&gt;&lt;span class=&quot;t-label&quot;&gt;sh&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cb-body&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;nabi new hello
cd hello
nabi run
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;010-包含什么&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#010-包含什么&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;0.1.0 包含什么&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;编译器 &lt;code&gt;nabic&lt;/code&gt;。它有自己的代码生成器和链接器：不依赖 LLVM、系统链接器或 C 编译器。内置的 C 前端可以为 &lt;code&gt;nabi bindgen&lt;/code&gt; 读取 C 头文件，并通过 &lt;code&gt;nabi cc&lt;/code&gt; 编译 C 源文件。
&lt;/li&gt;
&lt;li&gt;构建与包管理工具 &lt;code&gt;nabi&lt;/code&gt;：&lt;code&gt;new&lt;/code&gt;、&lt;code&gt;build&lt;/code&gt;、&lt;code&gt;run&lt;/code&gt;、&lt;code&gt;test&lt;/code&gt;、&lt;code&gt;bench&lt;/code&gt;、&lt;code&gt;fmt&lt;/code&gt;、&lt;code&gt;lint&lt;/code&gt;、&lt;code&gt;doc&lt;/code&gt;、&lt;code&gt;add&lt;/code&gt;、&lt;code&gt;publish&lt;/code&gt;、用于安装和切换版本的 &lt;code&gt;toolchain&lt;/code&gt; 等（&lt;code&gt;nabi help&lt;/code&gt; 会列出全部命令）。
&lt;/li&gt;
&lt;li&gt;语言服务器 &lt;code&gt;nabils&lt;/code&gt;、REPL（&lt;code&gt;nabi repl&lt;/code&gt;）和 Jupyter 内核（&lt;code&gt;nabi jupyter install&lt;/code&gt;）。
&lt;/li&gt;
&lt;li&gt;运行时，带有支持多线程的分代、移动式垃圾回收器，以及异步任务。
&lt;/li&gt;
&lt;li&gt;分为 &lt;code&gt;bare&lt;/code&gt;、&lt;code&gt;core&lt;/code&gt; 和 &lt;code&gt;std&lt;/code&gt; 三层的标准库：集合类型、文本、数值、时间、文件、进程、网络和 TLS。其 API 见 &lt;a href=&quot;https://docs.nabi-lang.org/latest/zh-hans/std&quot;&gt;docs.nabi-lang.org&lt;/a&gt;。
&lt;/li&gt;
&lt;li&gt;包注册表 &lt;a href=&quot;https://packages.nabi-lang.org&quot;&gt;packages.nabi-lang.org&lt;/a&gt;，带有 20 个官方包：&lt;code&gt;autodiff&lt;/code&gt;、&lt;code&gt;csv&lt;/code&gt;、&lt;code&gt;http&lt;/code&gt;、&lt;code&gt;interpolate&lt;/code&gt;、&lt;code&gt;json&lt;/code&gt;、&lt;code&gt;linalg&lt;/code&gt;、&lt;code&gt;markdown&lt;/code&gt;、&lt;code&gt;nabi-syntax&lt;/code&gt;、&lt;code&gt;ode&lt;/code&gt;、&lt;code&gt;optimize&lt;/code&gt;、&lt;code&gt;plot&lt;/code&gt;、&lt;code&gt;regex&lt;/code&gt;、&lt;code&gt;signal&lt;/code&gt;、&lt;code&gt;sparse&lt;/code&gt;、&lt;code&gt;spatial&lt;/code&gt;、&lt;code&gt;special&lt;/code&gt;、&lt;code&gt;stats&lt;/code&gt;、&lt;code&gt;table&lt;/code&gt;、&lt;code&gt;toml&lt;/code&gt; 和 &lt;code&gt;units&lt;/code&gt;。它们随工具链提供：使用某个官方包的代码在首次使用时会自动把它加入清单，无需联网。
&lt;/li&gt;
&lt;li&gt;通过 &lt;code&gt;nabils&lt;/code&gt; 提供的编辑器支持：&lt;a href=&quot;https://github.com/nabi-lang/nabi.vscode&quot;&gt;VS Code&lt;/a&gt;、&lt;a href=&quot;https://github.com/nabi-lang/nabi.vim&quot;&gt;Vim&lt;/a&gt; 和 &lt;a href=&quot;https://github.com/nabi-lang/nabi.zed&quot;&gt;Zed&lt;/a&gt;。
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://playground.nabi-lang.org&quot;&gt;Playground&lt;/a&gt;，它把程序编译为 WebAssembly 并在浏览器中运行。
&lt;/li&gt;
&lt;li&gt;文档：指南、示例、语言和标准库规范、标准库 API，以及每个错误码各一页的说明，提供英文和韩文版本。
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;平台&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#平台&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;平台&lt;/h2&gt;
&lt;p&gt;工具链在 8 个主机上运行，每个主机一个发布压缩包：&lt;/p&gt;
&lt;div class=&quot;table-wrap&quot;&gt;&lt;table&gt;
&lt;thead&gt;&lt;tr&gt;&lt;th&gt;主机&lt;/th&gt;&lt;th&gt;triple&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;macOS，Apple 芯片&lt;/td&gt;&lt;td&gt;&lt;code&gt;aarch64-apple-darwin&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Windows 11，x64&lt;/td&gt;&lt;td&gt;&lt;code&gt;x86_64-pc-windows-msvc&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Windows 11，arm64&lt;/td&gt;&lt;td&gt;&lt;code&gt;aarch64-pc-windows-msvc&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Linux x64，glibc 2.34+&lt;/td&gt;&lt;td&gt;&lt;code&gt;x86_64-unknown-linux-gnu&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Linux arm64，glibc 2.34+&lt;/td&gt;&lt;td&gt;&lt;code&gt;aarch64-unknown-linux-gnu&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Linux x64，静态（musl）&lt;/td&gt;&lt;td&gt;&lt;code&gt;x86_64-unknown-linux-musl&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Linux arm64，静态（musl）&lt;/td&gt;&lt;td&gt;&lt;code&gt;aarch64-unknown-linux-musl&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;FreeBSD 14+，x64&lt;/td&gt;&lt;td&gt;&lt;code&gt;x86_64-unknown-freebsd&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;它可以为 17 个已支持目标构建：这 8 个主机，加上 &lt;code&gt;i686-unknown-linux-gnu&lt;/code&gt;、&lt;code&gt;i686-pc-windows-msvc&lt;/code&gt;、&lt;code&gt;armv7-unknown-linux-gnueabihf&lt;/code&gt;、&lt;code&gt;armv7-unknown-linux-musleabihf&lt;/code&gt;、&lt;code&gt;wasm32-unknown-unknown&lt;/code&gt;（浏览器）、&lt;code&gt;wasm32-wasip2&lt;/code&gt;、&lt;code&gt;wasm32-wasip1-threads&lt;/code&gt;、&lt;code&gt;x86_64-linux-android&lt;/code&gt;（在模拟器上测试）和 &lt;code&gt;aarch64-apple-ios-sim&lt;/code&gt;（iOS 模拟器）。一个目标在其真实环境中通过测试后即为已支持。每个压缩包都带有所有已支持目标的运行时，因此 &lt;code&gt;nabi build --target &amp;lt;triple&amp;gt;&lt;/code&gt; 可以在任何主机上交叉编译；Apple 目标只能在 macOS 上构建，Android 目标需要 NDK。&lt;/p&gt;
&lt;p&gt;有六个目标正在进行中。代码已经就绪，但它们只在模拟环境中运行过，因此 &lt;code&gt;--target&lt;/code&gt; 会拒绝它们，并说明目前该用什么：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;aarch64-linux-android&lt;/code&gt;（Android 设备）
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aarch64-apple-ios&lt;/code&gt;（iOS 设备）
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;riscv64gc-unknown-linux-gnu&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;powerpc64le-unknown-linux-gnu&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;s390x-unknown-linux-gnu&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;riscv32imac-unknown-none-elf&lt;/code&gt;（嵌入式 RISC-V）
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;../roadmap.html&quot;&gt;路线图&lt;/a&gt;把它们排在 0.2 系列。&lt;/p&gt;
&lt;h2 id=&quot;稳定性&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#稳定性&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;稳定性&lt;/h2&gt;
&lt;p&gt;Nabi 处于 1.0 之前，对于 0.x 遵循 Cargo 对语义化版本的解读：次版本号是破坏性变更的位置。0.2.0 可能破坏为 0.1 编写的代码；0.1.1、0.1.2 等版本增加功能和修复，但不会破坏它。在 1.0 之前，每个次版本都可能有破坏性变更。只有最新的系列会得到修复，包括安全修复。&lt;/p&gt;
&lt;h2 id=&quot;安装&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#安装&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;安装&lt;/h2&gt;
&lt;p&gt;macOS、Linux 和 FreeBSD：&lt;/p&gt;
&lt;div class=&quot;code cb&quot;&gt;&lt;div class=&quot;cb-h&quot;&gt;&lt;span class=&quot;t-label&quot;&gt;sh&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cb-body&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;curl -fsSL https://nabi.sh | sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Windows 11（x64 或 arm64），在 PowerShell 中运行：&lt;/p&gt;
&lt;div class=&quot;code cb&quot;&gt;&lt;div class=&quot;cb-h&quot;&gt;&lt;span class=&quot;t-label&quot;&gt;powershell&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cb-body&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;powershell -ExecutionPolicy Bypass -c &amp;quot;irm https://nabi.sh/install.ps1 | iex&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;脚本会为你的机器选择压缩包，校验其 SHA-256，然后解压到 &lt;code&gt;~/.nabi&lt;/code&gt;（Windows：&lt;code&gt;%USERPROFILE%\.nabi&lt;/code&gt;）。&lt;a href=&quot;../download.html&quot;&gt;下载页面&lt;/a&gt;提供压缩包和其他安装方式；Nix 用户可以运行 &lt;code&gt;nix profile install github:nabi-lang/nabi&lt;/code&gt;。&lt;/p&gt;
&lt;h2 id=&quot;验证下载的文件&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#验证下载的文件&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;验证下载的文件&lt;/h2&gt;
&lt;p&gt;每个版本都有一个 &lt;code&gt;SHA256SUMS&lt;/code&gt; 文件，用 &lt;a href=&quot;https://jedisct1.github.io/minisign/&quot;&gt;minisign&lt;/a&gt; 签名（&lt;code&gt;SHA256SUMS.minisig&lt;/code&gt;），并为每个压缩包提供 GitHub 构建来源证明。发布签名密钥：&lt;/p&gt;
&lt;div class=&quot;code cb&quot;&gt;&lt;div class=&quot;cb-h&quot;&gt;&lt;span class=&quot;t-label&quot;&gt;text&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cb-body&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;untrusted comment: minisign public key B33E6FE61BE5314C
RWRMMeUb5m8+s0rEtzbR47dmyrMdlGyGQSvWUn/Ob5QYh0GHgs1GvJEs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;code cb&quot;&gt;&lt;div class=&quot;cb-h&quot;&gt;&lt;span class=&quot;t-label&quot;&gt;sh&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cb-body&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;minisign -Vm SHA256SUMS -P RWRMMeUb5m8+s0rEtzbR47dmyrMdlGyGQSvWUn/Ob5QYh0GHgs1GvJEs
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify nabi-0.1.0-x86_64-unknown-linux-gnu.tar.xz --repo nabi-lang/nabi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;各系统的具体步骤见&lt;a href=&quot;../download.html#验证下载的文件&quot;&gt;下载页面&lt;/a&gt;。&lt;/p&gt;
&lt;h2 id=&quot;已知限制&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#已知限制&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;已知限制&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;TLS 栈和 &lt;code&gt;core::crypto&lt;/code&gt; 中的密码学实现是 Nabi 自己的代码，已用 NIST CAVP 和 Wycheproof 测试向量测试，但尚未经过独立审计。请将它们视为实验性的，暂时不要依赖它们保护真正的机密。
&lt;/li&gt;
&lt;li&gt;二进制文件没有代码签名：目前既没有 macOS 公证，也没有 Windows Authenticode。对于用浏览器下载的压缩包，Gatekeeper 和 SmartScreen 会发出警告；&lt;code&gt;curl | sh&lt;/code&gt; 和 &lt;code&gt;irm | iex&lt;/code&gt; 安装方式不受影响。目前请用上述 minisign 签名和来源证明来校验下载的文件。
&lt;/li&gt;
&lt;li&gt;有六个目标正在进行中（见上文）。
&lt;/li&gt;
&lt;li&gt;目前只有注册表的维护者可以发布包。任何人都可以登录并使用包；对于尚不能发布的账户，&lt;code&gt;nabi login&lt;/code&gt; 会给出说明。
&lt;/li&gt;
&lt;li&gt;为 &lt;code&gt;-gnu&lt;/code&gt; Linux 目标构建的程序需要 glibc 2.34 或更高版本。在较旧的系统上，安装程序会选择静态 musl 压缩包。
&lt;/li&gt;
&lt;li&gt;工具链的构建缓存上限为 5 GiB；设置 &lt;code&gt;NABI_CACHE_MAX_SIZE&lt;/code&gt;（&lt;code&gt;2G&lt;/code&gt;、&lt;code&gt;off&lt;/code&gt;）可以修改上限，&lt;code&gt;nabi cache prune&lt;/code&gt; 或 &lt;code&gt;nabi cache clean&lt;/code&gt; 可以缩减缓存。
&lt;/li&gt;
&lt;li&gt;Nabi 目前没有公开的性能对比。它的代码生成器还很年轻；请自己测量你的工作负载。
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;参与进来&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#参与进来&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;参与进来&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;提问、想法和作品展示：&lt;a href=&quot;https://github.com/nabi-lang/nabi/discussions&quot;&gt;GitHub Discussions&lt;/a&gt;。
&lt;/li&gt;
&lt;li&gt;bug：在相关仓库中提交 &lt;a href=&quot;https://github.com/nabi-lang/nabi/issues&quot;&gt;issue&lt;/a&gt;。
&lt;/li&gt;
&lt;li&gt;代码和文档：请阅读 &lt;a href=&quot;https://github.com/nabi-lang/nabi/blob/main/CONTRIBUTING.md&quot;&gt;CONTRIBUTING.md&lt;/a&gt;。每个提交都要带 DCO 签署（&lt;code&gt;git commit -s&lt;/code&gt;）；不需要签 CLA。
&lt;/li&gt;
&lt;li&gt;安全问题：不要公开报告。请使用 GitHub 的私密漏洞报告，或写信至 security@nabi-lang.org（&lt;a href=&quot;https://github.com/nabi-lang/nabi/blob/main/SECURITY.md&quot;&gt;SECURITY.md&lt;/a&gt;）。
&lt;/li&gt;
&lt;li&gt;常见问题：见&lt;a href=&quot;../faq.html&quot;&gt;常见问题&lt;/a&gt;。
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;致谢&quot;&gt;&lt;a class=&quot;anchor&quot; href=&quot;#致谢&quot; aria-label=&quot;本节链接&quot;&gt;#&lt;/a&gt;致谢&lt;/h2&gt;
&lt;p&gt;感谢所有试用早期构建、报告问题和审阅文档草稿的人，也感谢 Nabi 借鉴和依托的项目：编写 Nabi 所用的 Rust 工具链，以及 musl、wasi-libc、mingw-w64 和 &lt;a href=&quot;https://github.com/nabi-lang/nabi/blob/main/THIRD-PARTY-NOTICES&quot;&gt;THIRD-PARTY-NOTICES&lt;/a&gt; 中列出的其他项目。&lt;/p&gt;
</content>
</entry>
</feed>
