Rust 1.100.0
Rust 1.100

原始链接: https://github.com/rust-lang/rust/releases/tag/1.100.0

Rust 1.100.0 稳定了许多 API,包括 `Box`/`Vec` 的分配器支持、分配器 trait 实现、`Cow` 的 `PartialEq` 实现、`bool::toggle`、`Box`/`Rc`/`Arc` 映射辅助函数、`trim_prefix`/`trim_suffix`、`Path::trim_prefix`、`Vec::from_fn`,以及 Windows 的 `show_window`。Cargo 增加了可控的 lint(包括 `unused_dependencies`)、依赖冷却、`cargo install` 默认使用锁文件,以及新的中间构建产物布局。提到了 Rustdoc 兼容性说明,但没有更多细节。此版本还包括平台支持相关引用,以及 `DropGuard` 和 `UnsafeCell` 辅助函数等稳定化的实用工具。

Rust 1.100.0 已发布。主要变更包括 never 类型稳定化、自定义分配器、Cargo 对未使用依赖的警告、依赖冷却期,以及 cargo install 默认使用已有 lockfile。评论者还提到一些更小的稳定化 API,例如 `bool::toggle()`、`Box::map()` 和 trim 辅助函数。Hacker News 的讨论庆祝这次大版本发布并感谢贡献者,同时也就缺乏稳定的原生 Rust ABI 展开辩论;有人建议使用 `extern "C"` 或最小的 crABI,也有人希望预构建库和更快的构建。
相关文章

原文

No results found

Language

Compiler

Platform Support

Refer to Rust's platform support page for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

Cargo

  • Introduced Cargo's own linting system: some Cargo warnings are now emitted as lints that users can control in the [lints.cargo] table. This includes a new built-in unused dependency check via the cargo::unused_dependencies lint. docs #17298
  • Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in Cargo.lock. (RFC 3923) docs #17335
  • cargo-install: now uses the existing lockfile in the .crate tarball by default. --locked in cargo install becomes a no-op. #17388
  • Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use Cargo’s JSON messages to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. (build cache doc) #17354

Rustdoc

Compatibility Notes

Other

联系我们 contact @ memedata.com