Bun 从 Zig 到 Rust 的迁移已经实锤,下个版本可能成为最后一个 Zig 版本

来自 Bun 创始人的 推文 : Bun v1.3.14 releases tomorrow. Bun v1.3.14 将于明天发布。 If we do merge the Rust rewrite, this would be the last version in Zig 如果我们确定合并 Ru...
Bun 从 Zig 到 Rust 的迁移已经实锤,下个版本可能成为最后一个 Zig 版本
Bun 从 Zig 到 Rust 的迁移已经实锤,下个版本可能成为最后一个 Zig 版本

来自 Bun 创始人的 推文

Bun v1.3.14 releases tomorrow.

Bun v1.3.14 将于明天发布。

If we do merge the Rust rewrite, this would be the last version in Zig

如果我们确定合并 Rust 重写版,那么这将是最后一个基于 Zig 语言的版本。

形式大好,看来迁移主要原因还是内存和崩溃问题:

目前我对它( Rust 重写版)非常有信心。它已经通过了 Bun 在 Linux (x64 + arm64 glibc + musl)、Windows (x64 & arm64) 以及 macOS (x64 & arm64) 上的所有测试套件。它可能会同时修复大约 200 个 GitHub issue 。目前还在进行重构和简化,相关的博文也还没写。

我还没看到过任何一个基准测试显示它比 Zig 版本慢。两者的代码库基本一致。它没有使用 Rust 的异步( async )机制,且和 Zig 版本一样,极少使用第三方库。本质上它们是同一个东西,只是 Rust 提供了更好的工具来帮我们防止程序崩溃。

来源: V2EX - 技术查看原文