惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
量子位
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
爱范儿
爱范儿
博客园 - 【当耐特】
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
博客园 - 叶小钗
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
B
Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
V
V2EX

Rust Blog

Security Advisory for Cargo (CVE-2026-5223) | Rust Blog Security Advisory for Cargo (CVE-2026-5222) | Rust Blog Project goals update — April 2026 (end of 2025H2) | Rust Blog Rust is participating in Outreachy | Rust Blog Raising the baseline for the `nvptx64-nvidia-cuda` target | Rust Blog Announcing Google Summer of Code 2026 selected projects | Rust Blog Announcing Rust 1.95.0 | Rust Blog docs.rs: building fewer targets by default | Rust Blog Changes to WebAssembly targets and handling undefined symbols | Rust Blog Announcing Rust 1.94.1 | Rust Blog Security advisory for Cargo | Rust Blog What we heard about Rust's challenges | Rust Blog Call for Testing: Build Dir Layout v2 | Rust Blog Announcing rustup 1.29.0 | Rust Blog Announcing Rust 1.94.0 | Rust Blog 2025 State of Rust Survey Results | Rust Blog Rust debugging survey 2026 | Rust Blog Update on the October 15, 2018 incident on crates.io Announcing Rust 1.29.2 Announcing Rust 1.29 Launching the 2018 State of Rust Survey Announcing Rust 1.28 What is Rust 2018? Announcing Rust 1.27.2 Announcing Rust 1.27.1 Security Advisory for rustdoc Announcing Rust 1.27 Announcing Rust 1.26.2 Announcing Rust 1.26.1 Rust turns three
Announcing Rust 1.24
The Rust Core Team · 2018-02-15 · via Rust Blog

The Rust team is happy to announce a new version of Rust, 1.24.0. Rust is a systems programming language focused on safety, speed, and concurrency.

If you have a previous version of Rust installed via rustup, getting Rust 1.24.0 is as easy as:

$ rustup update stable

If you don't have it already, you can get rustup from the appropriate page on our website, and check out the detailed release notes for 1.24.0 on GitHub.

What's in 1.24.0 stable

This release contains two very exciting new features: rustfmt and incremental compilation!

rustfmt

For years now, we've wanted a tool that automatically can reformat your Rust code to some sort of "standard style." With this release, we're happy to announce that a preview of rustfmt can be used with 1.24 stable. To give it a try, do this:

$ rustup component add rustfmt-preview

There are two important aspects here: first, you're using rustup component add instead of cargo install here. If you've previously used rustfmt via cargo install, you should uninstall it first. Second, this is a preview, as it says in the name. rustfmt is not at 1.0 yet, and some stuff is being tweaked, and bugs are being fixed. Once rustfmt hits 1.0, we'll be releasing a rustfmt component and deprecating rustfmt-preview.

In the near future, we plan on writing a post about this release strategy, as it's big enough for its own post, and is broader than just this release.

For more, please check out rustfmt on GitHub.

Incremental compilation

Back in September of 2016 (!!!), we blogged about Incremental Compilation. While that post goes into the details, the idea is basically this: when you're working on a project, you often compile it, then change something small, then compile again. Historically, the compiler has compiled your entire project, no matter how little you've changed the code. The idea with incremental compilation is that you only need to compile the code you've actually changed, which means that that second build is faster.

As of Rust 1.24, this is now turned on by default. This means that your builds should get faster! Don't forget about cargo check when trying to get the lowest possible build times.

This is still not the end story for compiler performance generally, nor incremental compilation specifically. We have a lot more work planned in the future. For example, another change related to performance hit stable this release: codegen-units is now set to 16 by default. One small note about this change: it makes builds faster, but makes the final binary a bit slower. For maximum speed, setting codegen-units to 1 in your Cargo.toml is needed to eke out every last drop of performance.

More to come!

Other good stuff

There's one other change we'd like to talk about here: undefined behavior. Rust generally strives to minimize undefined behavior, having none of it in safe code, and as little as possible in unsafe code. One area where you could invoke UB is when a panic! goes across an FFI boundary. In other words, this:

extern "C" fn panic_in_ffi() {
    panic!("Test");
}

This cannot work, as the exact mechanism of how panics work would have to be reconciled with how the "C" ABI works, in this example, or any other ABI in other examples.

In Rust 1.24, this code will now abort instead of producing undefined behavior.

See the detailed release notes for more.

Library stabilizations

If you're a fan of str::find, which is used to find a given char inside of a &str, you'll be happy to see this pull request: it's now 10x faster! This is thanks to memchr. [u8]::contains uses it too, though it doesn't get such an extreme speedup.

Additionally, a few new APIs were stabilized this release:

Finally, these functions may now be used inside a constant expression, for example, to initialize a static:

  • Cell, RefCell, and UnsafeCell's new functions
  • The new functions of the various Atomic integer types
  • {integer}::min_value and max_value
  • mem's size_of and align_of
  • ptr::null and null_mut

See the detailed release notes for more.

Cargo features

The big feature of this release was turning on incremental compilation by default, as mentioned above.

See the detailed release notes for more.

Contributors to 1.24.0

Many people came together to create Rust 1.24. We couldn't have done it without all of you. Thanks!