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

推荐订阅源

AI
AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
Last Week in AI
Last Week in AI
Apple Machine Learning Research
Apple Machine Learning Research
WordPress大学
WordPress大学
F
Full Disclosure
博客园 - 【当耐特】
博客园 - 司徒正美
V
Visual Studio Blog
F
Fortinet All Blogs
T
Tor Project blog
T
Threatpost
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
C
Cyber Attacks, Cyber Crime and Cyber Security
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
M
MIT News - Artificial intelligence
L
Lohrmann on Cybersecurity
P
Palo Alto Networks Blog
I
Intezer
Stack Overflow Blog
Stack Overflow Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
S
Securelist
T
Tailwind CSS Blog
V
Vulnerabilities – Threatpost
U
Unit 42
博客园 - 叶小钗
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
Hacker News - Newest:
Hacker News - Newest: "LLM"
NISL@THU
NISL@THU
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
SecWiki News
SecWiki News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
A
Arctic Wolf
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
N
News | PayPal Newsroom

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.26 The Rust Team All Hands in Berlin: a Recap Increasing Rust’s Reach 2018 Announcing Rust 1.25 Rust's 2018 roadmap Announcing Rust 1.24.1 Announcing Rust 1.24 The 2018 Rust Event Lineup Announcing Rust 1.23 New Year's Rust: A Call for Community Blogposts Rust in 2017: what we achieved Fearless Concurrency in Firefox Quantum Announcing Rust 1.21 impl Future for Rust Rust 2017 Survey Results Announcing Rust 1.20 Announcing Rust 1.19 The 2017 Rust Conference Lineup Rust's 2017 roadmap, six months in Increasing Rust’s Reach Announcing Rust 1.18 Two years of Rust The Rust Libz Blitz Launching the 2017 State of Rust Survey Announcing Rust 1.17 Announcing Rust 1.16 Rust's language ergonomics initiative Announcing Rust 1.15.1 Rust's 2017 roadmap Announcing Rust 1.15 Announcing Rust 1.14 Announcing the First Underhanded Rust Contest Announcing Rust 1.13 Announcing Rust 1.12.1 Announcing Rust 1.12 Incremental Compilation Announcing Rust 1.11 Shape of errors to come The 2016 Rust Conference Lineup Announcing Rust 1.10 State of Rust Survey 2016 Announcing Rust 1.9 One year of Rust Taking Rust everywhere with rustup Launching the 2016 State of Rust Survey Cargo: predictable dependency management Introducing MIR Announcing Rust 1.8 Announcing Rust 1.7 Announcing Rust 1.6 Announcing Rust 1.5 Announcing Rust 1.4 Announcing Rust 1.3 Rust in 2016 Announcing Rust 1.2 Rust 1.1 stable, the Community Subteam, and RustCamp Announcing Rust 1.0 Abstraction without overhead: traits in Rust Rust Once, Run Everywhere Mixing matching, mutation, and moves in Rust Fearless Concurrency with Rust Announcing Rust 1.0 Beta Announcing Rust 1.0.0.alpha.2 Rust 1.0: status report and final timeline Announcing Rust 1.0 Alpha Rust 1.0: Scheduling the trains Yehuda Katz and Steve Klabnik are joining the Rust Core Team Cargo: Rust's community crate host Stability as a Deliverable Road to Rust 1.0
Announcing Rust 1.22 (and 1.22.1)
The Rust Core Team · 2017-11-22 · via Rust Blog

The Rust team is happy to announce two new versions of Rust, 1.22.0 and 1.22.1. Rust is a systems programming language focused on safety, speed, and concurrency.

Wait, two versions? At the last moment, we discovered a late-breaking issue with the new macOS High Sierra in 1.22.0, and for various reasons, decided to release 1.22.0 as usual, but also put out a 1.22.1 with the patch. The bug is actually in Cargo, not rustc, and only affects users on macOS High Sierra.

If you have a previous version of Rust installed via rustup, getting Rust 1.22.1 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.22.0 and 1.22.1 on GitHub.

What's in 1.22.0 and 1.22.1 stable

The headline feature for this release is one many have been anticipating for a long time: you can now use ? with Option<T>! About a year ago, in Rust 1.13, we introduced the ? operator for working with Result<T, E>. Ever since then, there's been discussion about how far ? should go: should it stay only for results? Should it be user-extensible? Should it be usable with Option<T>?

In Rust 1.22, basic usage of ? with Option<T> is now stable. This code will now compile:

fn add_one_to_first(list: &[u8]) -> Option<u8> {
    // get first element, if exists
    // return None if it doesn't
    let first = list.get(0)?;
    Some(first + 1)
}

assert_eq!(add_one_to_first(&[10, 20, 30]), Some(11));
assert_eq!(add_one_to_first(&[]), None);

However, this functionality is still a bit limited; you cannot yet write code that mixes results and options with ? in the same function, for example. This will be possible in the future, and already is in nightly Rust; expect to hear more about this in a future release.

Types that implement Drop are now allowed in const and static items. Like this:

struct Foo {
    a: u32,
}

impl Drop for Foo {
    fn drop(&mut self) {}
}

const F: Foo = Foo { a: 0 };
static S: Foo = Foo { a: 0 };

This change doesn't bring much on its own, but as we improve our ability to compute things at compile-time, more and more will be possible in const and static.

Additionally, some small quality-of-life improvements:

Two recent compiler changes should speed up compiles in debug mode. We don't have any specific numbers to commit to with these changes, but as always, compile times are very important to us, and we're continuing to work on improving them.

T op= &T now works for primitive types, which is a fancy way of saying:

let mut x = 2;
let y = &8;

// this didn't work, but now does
x += y;

Previously, you'd have needed to write x += *y in order to de-reference, so this solves a small papercut.

Backtraces are improved on MacOS.

You can now create compile-fail tests in Rustdoc, like this:

/// ```compile_fail
/// let x = 5;
/// x += 2; // shouldn't compile!
/// ```

Please note that these kinds of tests can be more fragile than others, as additions to Rust may cause code to compile when it previously would not. Consider the first announcement with ?, for example: that code would fail to compile on Rust 1.21, but compile successfully on Rust 1.22, causing your test suite to start failing.

Finally, we removed support for the le32-unknown-nacl target. Google itself has deprecated PNaCl, instead throwing its support behind WebAssembly. You can already compile Rust code to WebAssembly today, and you can expect to hear more developments regarding this in future releases.

See the detailed release notes for more.

Library stabilizations

A few new APIs were stabilized this release:

See the detailed release notes for more.

Cargo features

If you have a big example to show your users, Cargo has grown the ability to build multi-file examples by creating a subdirectory inside examples that contains a main.rs.

Cargo now has the ability to vendor git repositories.

See the detailed release notes for more.

Contributors to 1.22.0 and 1.22.1

Many people came together to create Rust 1.22. We couldn't have done it without all of you. Thanks! (and Thanks again!)