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

推荐订阅源

T
Threatpost
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
T
Tailwind CSS Blog
The Cloudflare Blog
The Last Watchdog
The Last Watchdog
PCI Perspectives
PCI Perspectives
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
云风的 BLOG
云风的 BLOG
C
Cybersecurity and Infrastructure Security Agency CISA
O
OpenAI News
Recorded Future
Recorded Future
GbyAI
GbyAI
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
博客园 - 叶小钗
V
Vulnerabilities – Threatpost
F
Full Disclosure
Recent Announcements
Recent Announcements
Vercel News
Vercel News
S
Schneier on Security
H
Heimdal Security Blog
Cisco Talos Blog
Cisco Talos Blog
V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
B
Blog RSS Feed
宝玉的分享
宝玉的分享
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
G
Google Developers Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
爱范儿
爱范儿
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
N
Netflix TechBlog - Medium
S
Security @ Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyberwarzone
Cyberwarzone

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 Announcing Rust 1.22 (and 1.22.1) 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 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.18
The Rust Core Team · 2017-06-08 · via Rust Blog

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

If you have a previous version of Rust installed, getting Rust 1.18 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.18.0 on GitHub.

What's in 1.18.0 stable

As usual, Rust 1.18.0 is a collection of improvements, cleanups, and new features.

One of the largest changes is a long time coming: core team members Carol Nichols and Steve Klabnik have been writing a new edition of "The Rust Programming Language", the official book about Rust. It's being written openly on GitHub, and has over a hundred contributors in total. This release includes the first draft of the second edition in our online documentation. 19 out of 20 chapters have a draft; the draft of chapter 20 will land in Rust 1.19. When the book is done, a print version will be made available through No Starch Press, if you'd like a paper copy. We're still working with the editors at No Starch to improve the text, but we wanted to start getting a wider audience now.

The new edition is a complete re-write from the ground up, using the last two years of knowledge we've gained from teaching people Rust. You'll find brand-new explanations for a lot of Rust's core concepts, new projects to build, and all kinds of other good stuff. Please check it out and let us know what you think!

As for the language itself, an old feature has learned some new tricks: the pub keyword has been expanded a bit. Experienced Rustaceans will know that items are private by default in Rust, and you can use the pub keyword to make them public. In Rust 1.18.0, pub has gained a new form:

pub(crate) bar;

The bit inside of () is a 'restriction', which refines the notion of how this is made public. Using the crate keyword like the example above means that bar would be public to the entire crate, but not outside of it. This makes it easier to declare APIs that are "public to your crate", but not exposed to your users. This was possible with the existing module system, but often very awkward.

You can also specify a path, like this:

pub(in a::b::c) foo;

This means "usable within the hierarchy of a::b::c, but not elsewhere." This feature was defined in RFC 1422 and is documented in the reference.

For our Windows users, Rust 1.18.0 has a new attribute, #![windows_subsystem]. It works like this:

#![windows_subsystem = "console"]
#![windows_subsystem = "windows"]

These control the /SUBSYSTEM flag in the linker. For now, only "console" and "windows" are supported.

When is this useful? In the simplest terms, if you're developing a graphical application, and do not specify "windows", a console window would flash up upon your application's start. With this flag, it won't.

Finally, Rust's tuples, enum variant fields, and structs (without #[repr]) have always had an unspecified layout. We've turned on automatic re-ordering, which can result in smaller sizes through reducing padding. Consider a struct like this:

struct Suboptimal(u8, u16, u8);

In previous versions of Rust on the x86_64 platform, this struct would have the size of six bytes. But looking at the source, you'd expect it to have four. The extra two bytes come from padding; given that we have a u16 here, it should be aligned to two bytes. But in this case, it's at offset one. To move it to offset two, another byte of padding is placed after the first u8. To give the whole struct a proper alignment, another byte is added after the second u8 as well, giving us 1 + 1 (padding) + 2 + 1 + 1 (padding) = 6 bytes.

But what if our struct looked like this?

struct Optimal(u8, u8, u16);

This struct is properly aligned; the u16 lies on a two byte boundary, and so does the entire struct. No padding is needed. This gives us 1 + 1 + 2 = 4 bytes.

When designing Rust, we left the details of memory layout undefined for just this reason. Because we didn't commit to a particular layout, we can make improvements to it, such as in this case where the compiler can optimize Suboptimal into Optimal automatically. And if you check the sizes of Suboptimal and Optimal on Rust 1.18.0, you'll see that they both have a size of four bytes.

We've been planning this change for a while; previous versions of Rust included this optimization on the nightly channel, but some people wrote unsafe code that assumed the exact details of the representation. We rolled it back while we fixed all instances of this that we know about, but if you find some code breaks due to this, please let us know so we can help fix it! Structs used for FFI can be given the #[repr(C)] annotation to prevent reordering, in addition to C-compatible field layout.

We've been planning on moving rustdoc to use a CommonMark compliant markdown parser for a long time now. However, just switching over can introduce regressions where the CommonMark spec differs from our existing parser, Hoedown. As part of the transition plan, a new flag has been added to rustdoc, --enable-commonmark. This will use the new parser instead of the old one. Please give it a try! As far as we know, both parsers will produce identical results, but we'd be interested in knowing if you find a scenario where the rendered results differ!

Finally, compiling rustc itself is now 15%-20% faster. Each commit message in this PR goes over the details; there were some inefficiencies, and now they've been cleaned up.

See the detailed release notes for more.

Library stabilizations

Seven new APIs were stabilized this release:

See the detailed release notes for more.

Cargo features

Cargo has added support for the Pijul VCS, which is written in Rust. cargo new my-awesome-project --vcs=pijul will get you going!

To supplement the --all flag, Cargo now has several new flags such as --bins, --examples, --tests, and --benches, which will let you build all programs of that type.

Finally, Cargo now supports Haiku and Android!

See the detailed release notes for more.

Contributors to 1.18.0

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