The Rust Programming Language Blog
blog.rust-lang.org.web.brid.gy
The Rust Programming Language Blog
@blog.rust-lang.org.web.brid.gy
Empowering everyone to build reliable and efficient software.

[bridged from https://blog.rust-lang.org/ on the web: https://fed.brid.gy/web/blog.rust-lang.org ]
Announcing Rust 1.91.1
The Rust team has published a new point release of Rust, 1.91.1. Rust is a programming language that is empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via rustup, getting Rust 1.91.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. ## What's in 1.91.1 Rust 1.91.1 includes fixes for two regressions introduced in the 1.91.0 release. ### Linker and runtime errors on Wasm Most targets supported by Rust identify symbols by their name, but Wasm identifies them with a symbol name _and_ a Wasm module name. The `#[link(wasm_import_module)]` attribute allows to customize the Wasm module name an `extern` block refers to: #[link(wasm_import_module = "hello")] extern "C" { pub fn world(); } Rust 1.91.0 introduced a regression in the attribute, which could cause linker failures during compilation (_"import module mismatch"_ errors) or the wrong function being used at runtime (leading to undefined behavior, including crashes and silent data corruption). This happened when the same symbol name was imported from two different Wasm modules across multiple Rust crates. Rust 1.91.1 fixes the regression. More details are available in issue #148347. ### Cargo target directory locking broken on illumos Cargo relies on locking the `target/` directory during a build to prevent concurrent invocations of Cargo from interfering with each other. Not all filesystems support locking (most notably some networked ones): if the OS returns the `Unsupported` error when attempting to lock, Cargo assumes locking is not supported and proceeds without it. Cargo 1.91.0 switched from custom code interacting with the OS APIs to the `File::lock` standard library method (recently stabilized in Rust 1.89.0). Due to an oversight, that method always returned `Unsupported` on the illumos target, causing Cargo to never lock the build directory on illumos regardless of whether the filesystem supported it. Rust 1.91.1 fixes the oversight in the standard library by enabling the `File::lock` family of functions on illumos, indirectly fixing the Cargo regression. ### Contributors to 1.91.1 Many people came together to create Rust 1.91.1. We couldn't have done it without all of you. Thanks!
blog.rust-lang.org
November 11, 2025 at 12:40 AM
Announcing Rust 1.91.0
The Rust team is happy to announce a new version of Rust, 1.91.0. Rust is a programming language empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via `rustup`, you can get 1.91.0 with: $ 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.91.0. If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please report any bugs you might come across! ## What's in 1.91.0 stable ### `aarch64-pc-windows-msvc` is now a Tier 1 platform The Rust compiler supports a wide variety of targets, but the Rust Team can't provide the same level of support for all of them. To clearly mark how supported each target is, we use a tiering system: * Tier 3 targets are technically supported by the compiler, but we don't check whether their code build or passes the tests, and we don't provide any prebuilt binaries as part of our releases. * Tier 2 targets are guaranteed to build and we provide prebuilt binaries, but we don't execute the test suite on those platforms: the produced binaries might not work or might have bugs. * Tier 1 targets provide the highest support guarantee, and we run the full suite on those platforms for every change merged in the compiler. Prebuilt binaries are also available. Rust 1.91.0 promotes the `aarch64-pc-windows-msvc` target to Tier 1 support, bringing our highest guarantees to users of 64-bit ARM systems running Windows. ### Add lint against dangling raw pointers from local variables While Rust's borrow checking prevents dangling references from being returned, it doesn't track raw pointers. With this release, we are adding a warn-by-default lint on raw pointers to local variables being returned from functions. For example, code like this: fn f() -> *const u8 { let x = 0; &x } will now produce a lint: warning: a dangling pointer will be produced because the local variable `x` will be dropped --> src/lib.rs:3:5 | 1 | fn f() -> *const u8 { | --------- return type of the function is `*const u8` 2 | let x = 0; | - `x` is part the function and will be dropped at the end of the function 3 | &x | ^^ | = note: pointers do not have a lifetime; after returning, the `u8` will be deallocated at the end of the function because nothing is referencing it as far as the type system is concerned = note: `#[warn(dangling_pointers_from_locals)]` on by default Note that the code above is not unsafe, as it itself doesn't perform any dangerous operations. Only dereferencing the raw pointer after the function returns would be unsafe. We expect future releases of Rust to add more functionality helping authors to safely interact with raw pointers, and with unsafe code more generally. ### Stabilized APIs * `Path::file_prefix` * `AtomicPtr::fetch_ptr_add` * `AtomicPtr::fetch_ptr_sub` * `AtomicPtr::fetch_byte_add` * `AtomicPtr::fetch_byte_sub` * `AtomicPtr::fetch_or` * `AtomicPtr::fetch_and` * `AtomicPtr::fetch_xor` * `{integer}::strict_add` * `{integer}::strict_sub` * `{integer}::strict_mul` * `{integer}::strict_div` * `{integer}::strict_div_euclid` * `{integer}::strict_rem` * `{integer}::strict_rem_euclid` * `{integer}::strict_neg` * `{integer}::strict_shl` * `{integer}::strict_shr` * `{integer}::strict_pow` * `i{N}::strict_add_unsigned` * `i{N}::strict_sub_unsigned` * `i{N}::strict_abs` * `u{N}::strict_add_signed` * `u{N}::strict_sub_signed` * `PanicHookInfo::payload_as_str` * `core::iter::chain` * `u{N}::checked_signed_diff` * `core::array::repeat` * `PathBuf::add_extension` * `PathBuf::with_added_extension` * `Duration::from_mins` * `Duration::from_hours` * `impl PartialEq<str> for PathBuf` * `impl PartialEq<String> for PathBuf` * `impl PartialEq<str> for Path` * `impl PartialEq<String> for Path` * `impl PartialEq<PathBuf> for String` * `impl PartialEq<Path> for String` * `impl PartialEq<PathBuf> for str` * `impl PartialEq<Path> for str` * `Ipv4Addr::from_octets` * `Ipv6Addr::from_octets` * `Ipv6Addr::from_segments` * `impl<T> Default for Pin<Box<T>> where Box<T>: Default, T: ?Sized` * `impl<T> Default for Pin<Rc<T>> where Rc<T>: Default, T: ?Sized` * `impl<T> Default for Pin<Arc<T>> where Arc<T>: Default, T: ?Sized` * `Cell::as_array_of_cells` * `u{N}::carrying_add` * `u{N}::borrowing_sub` * `u{N}::carrying_mul` * `u{N}::carrying_mul_add` * `BTreeMap::extract_if` * `BTreeSet::extract_if` * `impl Debug for windows::ffi::EncodeWide<'_>` * `str::ceil_char_boundary` * `str::floor_char_boundary` * `impl Sum for Saturating<u{N}>` * `impl Sum<&Self> for Saturating<u{N}>` * `impl Product for Saturating<u{N}>` * `impl Product<&Self> for Saturating<u{N}>` These previously stable APIs are now stable in const contexts: * `<[T; N]>::each_ref` * `<[T; N]>::each_mut` * `OsString::new` * `PathBuf::new` * `TypeId::of` * `ptr::with_exposed_provenance` * `ptr::with_exposed_provenance_mut` ### Platform Support * Promote `aarch64-pc-windows-msvc` to Tier 1 * Promote `aarch64-pc-windows-gnullvm` and `x86_64-pc-windows-gnullvm` to Tier 2 with host tools. Note: llvm-tools and MSI installers are missing but will be added in future releases. Refer to Rust’s platform support page for more information on Rust’s tiered platform support. ### Other changes Check out everything that changed in Rust, Cargo, and Clippy. ## Contributors to 1.91.0 Many people came together to create Rust 1.91.0. We couldn't have done it without all of you. Thanks!
blog.rust-lang.org
October 31, 2025 at 12:24 AM
Project goals for 2025H2
On Sep 9, we merged RFC 3849, declaring our goals for the "second half" of 2025H2 -- well, the last 3 months, at least, since "yours truly" ran a bit behind getting the goals program organized. ## Flagship themes In prior goals programs, we had a few major flagship goals, but since many of these goals were multi-year programs, it was hard to see what progress had been made. This time we decided to organize things a bit differently. We established four flagship _themes_ , each of which covers a number of more specific goals. These themes cover the goals we expect to be the most impactful and constitute our major focus as a Project for the remainder of the year. The four themes identified in the RFC are as follows: * **Beyond the`&`**, making it possible to create user-defined smart pointers that are as ergonomic as Rust's built-in references `&`. * **Unblocking dormant traits** , extending the core capabilities of Rust's trait system to unblock long-desired features for language interop, lending iteration, and more. * **Flexible, fast(er) compilation** , making it faster to build Rust programs and improving support for specialized build scenarios like embedded usage and sanitizers. * **Higher-level Rust** , making higher-level usage patterns in Rust easier. ### "Beyond the `&`" Goal| Point of contact| Team(s) and Champion(s) ---|---|--- Reborrow traits| Aapo Alasuutari| compiler (Oliver Scherer), lang (Tyler Mandry) Design a language feature to solve Field Projections| Benno Lossin| lang (Tyler Mandry) Continue Experimentation with Pin Ergonomics| Frank King| compiler (Oliver Scherer), lang (TC) One of Rust's core value propositions is that it's a "library-based language"—libraries can build abstractions that feel built-in to the language even when they're not. Smart pointer types like `Rc` and `Arc` are prime examples, implemented purely in the standard library yet feeling like native language features. However, Rust's built-in reference types (`&T` and `&mut T`) have special capabilities that user-defined smart pointers cannot replicate. This creates a "second-class citizen" problem where custom pointer types can't provide the same ergonomic experience as built-in references. The "Beyond the `&`" initiative aims to share the special capabilities of `&`, allowing library authors to create smart pointers that are truly indistinguishable from built-in references in terms of syntax and ergonomics. This will enable more ergonomic smart pointers for use in cross-language interop (e.g., references to objects in other languages like C++ or Python) and for low-level projects like Rust for Linux that use smart pointers to express particular data structures. ### "Unblocking dormant traits" Goal| Point of contact| Team(s) and Champion(s) ---|---|--- Evolving trait hierarchies| Taylor Cramer| compiler, lang (Taylor Cramer), libs-api, types (Oliver Scherer) In-place initialization| Alice Ryhl| lang (Taylor Cramer) Next-generation trait solver| lcnr| types (lcnr) Stabilizable Polonius support on nightly| Rémy Rakic| types (Jack Huey) SVE and SME on AArch64| David Wood| compiler (David Wood), lang (Niko Matsakis), libs (Amanieu d'Antras), types Rust's trait system is one of its most powerful features, but it has a number of longstanding limitations that are preventing us from adopting new patterns. The goals in this category unblock a number of new capabilities: * Polonius will enable new borrowing patterns, and in particular unblock "lending iterators". Over the last few goal periods, we have identified an "alpha" version of Polonius that addresses the most important cases while being relatively simple and optimizable. Our goal for 2025H2 is to implement this algorithm in a form that is ready for stabilization in 2026. * The next-generation trait solver is a refactored trait solver that unblocks better support for numerous language features (implied bounds, negative impls, the list goes on) in addition to closing a number of existing bugs and sources of unsoundness. Over the last few goal periods, the trait solver went from being an early prototype to being in production use for coherence checking. The goal for 2025H2 is to prepare it for stabilization. * The work on evolving trait hierarchies will make it possible to refactor some parts of an existing trait into a new supertrait so they can be used on their own. This unblocks a number of features where the existing trait is insufficiently general, in particular stabilizing support for custom receiver types, a prior Project goal that wound up blocked on this refactoring. This will also make it safer to provide stable traits in the standard library while preserving the ability to evolve them in the future. * The work to expand Rust's `Sized` hierarchy will permit us to express types that are neither `Sized` nor `?Sized`, such as extern types (which have no size) or Arm's Scalable Vector Extension (which have a size that is known at runtime but not at compilation time). This goal builds on RFC #3729 and RFC #3838, authored in previous Project goal periods. * In-place initialization allows creating structs and values that are tied to a particular place in memory. While useful directly for projects doing advanced C interop, it also unblocks expanding `dyn Trait` to support `async fn` and `-> impl Trait` methods, as compiling such methods requires the ability for the callee to return a future whose size is not known to the caller. ### "Flexible, fast(er) compilation" Goal| Point of contact| Team(s) and Champion(s) ---|---|--- build-std| David Wood| cargo (Eric Huss), compiler (David Wood), libs (Amanieu d'Antras) Promoting Parallel Front End| Sparrow Li| compiler Production-ready cranelift backend| Folkert de Vries| compiler, wg-compiler-performance The "Flexible, fast(er) compilation" initiative focuses on improving Rust's build system to better serve both specialized use cases and everyday development workflows: * We are improving compilation performance through (1) parallel compilation in the compiler front-end, which delivers 20-30% faster builds, and (2) making the Cranelift backend production-ready for development use, offering roughly 20% faster code generation compared to LLVM for debug builds. * We are working to stabilize a core MVP of the `-Zbuild-std` feature, which allows developers to rebuild the standard library from source with custom compiler flags. This unblocks critical use cases for embedded developers and low-level projects like Rust for Linux while also enabling improvements like using sanitizers with the standard library or building `std` with debug information. ### "Higher-level Rust" Goal| Point of contact| Team(s) and Champion(s) ---|---|--- Stabilize cargo-script| Ed Page| cargo (Ed Page), compiler, lang (Josh Triplett), lang-docs (Josh Triplett) Ergonomic ref-counting: RFC decision and preview| Niko Matsakis| compiler (Santiago Pastorino), lang (Niko Matsakis) People generally start using Rust for foundational use cases, where the requirements for performance or reliability make it an obvious choice. But once they get used to it, they often find themselves turning to Rust even for higher-level use cases, like scripting, web services, or even GUI applications. Rust is often "surprisingly tolerable" for these high-level use cases -- except for some specific pain points that, while they impact everyone using Rust, hit these use cases particularly hard. We plan two flagship goals this period in this area: * We aim to stabilize cargo script, a feature that allows single-file Rust programs that embed their dependencies, making it much easier to write small utilities, share code examples, and create reproducible bug reports without the overhead of full Cargo projects. * We aim to finalize the design of ergonomic ref-counting and to finalize the experimental impl feature so it is ready for beta testing. Ergonomic ref-counting makes it less cumbersome to work with ref-counted types like `Rc` and `Arc`, particularly in closures. ## What to expect next For the remainder of 2025 you can expect monthly blog posts covering the major progress on the Project goals. Looking at the broader picture, we have now done three iterations of the goals program, and we want to judge how it should be run going forward. To start, Nandini Sharma from CMU has been conducting interviews with various Project members to help us see what's working with the goals program and what could be improved. We expect to spend some time discussing what we should do and to be launching the next iteration of the goals program next year. Whatever form that winds up taking, Tomas Sedovic, the Rust program manager hired by the Leadership Council, will join me in running the program. # Appendix: Full list of Project goals. Read the full slate of Rust Project goals. The full slate of Project goals is as follows. These goals all have identified points of contact who will drive the work forward as well as a viable work plan. **Invited goals.** Some of the goals below are "invited goals", meaning that for that goal to happen we need someone to step up and serve as a point of contact. To find the invited goals, look for the **"Help wanted"** badge in the table below. Invited goals have reserved capacity for teams and a mentor, so if you are someone looking to help Rust progress, they are a great way to get involved. Goal| Point of contact| Team(s) and Champion(s) ---|---|--- Develop the capabilities to keep the FLS up to date| Pete LeVasseur| bootstrap (Jakub Beránek), lang (Niko Matsakis), opsem, spec (Pete LeVasseur), types Getting Rust for Linux into stable Rust: compiler features| Tomas Sedovic| compiler (Wesley Wiser) Getting Rust for Linux into stable Rust: language features| Tomas Sedovic| lang (Josh Triplett), lang-docs (TC) Borrow checking in a-mir-formality| Niko Matsakis| types (Niko Matsakis) Reborrow traits| Aapo Alasuutari| compiler (Oliver Scherer), lang (Tyler Mandry) build-std| David Wood| cargo (Eric Huss), compiler (David Wood), libs (Amanieu d'Antras) Prototype Cargo build analysis| Weihang Lo| cargo (Weihang Lo) Rework Cargo Build Dir Layout| Ross Sullivan| cargo (Weihang Lo) Prototype a new set of Cargo "plumbing" commands| | cargo Stabilize cargo-script| Ed Page| cargo (Ed Page), compiler, lang (Josh Triplett), lang-docs (Josh Triplett) Continue resolving `cargo-semver-checks` blockers for merging into cargo| Predrag Gruevski| cargo (Ed Page), rustdoc (Alona Enraght-Moony) Emit Retags in Codegen| Ian McCormack| compiler (Ralf Jung), opsem (Ralf Jung) Comprehensive niche checks for Rust| Bastian Kersting| compiler (Ben Kimock), opsem (Ben Kimock) Const Generics| Boxy| lang (Niko Matsakis) Ergonomic ref-counting: RFC decision and preview| Niko Matsakis| compiler (Santiago Pastorino), lang (Niko Matsakis) Evolving trait hierarchies| Taylor Cramer| compiler, lang (Taylor Cramer), libs-api, types (Oliver Scherer) Design a language feature to solve Field Projections| Benno Lossin| lang (Tyler Mandry) Finish the std::offload module| Manuel Drehwald| compiler (Manuel Drehwald), lang (TC) Run more tests for GCC backend in the Rust's CI| Guillaume Gomez| compiler (Wesley Wiser), infra (Marco Ieni) In-place initialization| Alice Ryhl| lang (Taylor Cramer) C++/Rust Interop Problem Space Mapping| Jon Bauman| compiler (Oliver Scherer), lang (Tyler Mandry), libs (David Tolnay), opsem Finish the libtest json output experiment| Ed Page| cargo (Ed Page), libs-api, testing-devex MIR move elimination| Amanieu d'Antras| compiler, lang (Amanieu d'Antras), opsem, wg-mir-opt Next-generation trait solver| lcnr| types (lcnr) Implement Open API Namespace Support| | cargo (Ed Page), compiler (b-naber), crates-io (Carol Nichols) Promoting Parallel Front End| Sparrow Li| compiler Continue Experimentation with Pin Ergonomics| Frank King| compiler (Oliver Scherer), lang (TC) Stabilizable Polonius support on nightly| Rémy Rakic| types (Jack Huey) Production-ready cranelift backend| Folkert de Vries| compiler, wg-compiler-performance Stabilize public/private dependencies| | cargo (Ed Page), compiler Expand the Rust Reference to specify more aspects of the Rust language| Josh Triplett| lang-docs (Josh Triplett), spec (Josh Triplett) reflection and comptime| Oliver Scherer| compiler (Oliver Scherer), lang (Scott McMurray), libs (Josh Triplett) Relink don't Rebuild| Jane Lusby| cargo, compiler Rust Vision Document| Niko Matsakis| leadership-council rustc-perf improvements| James| compiler, infra Stabilize rustdoc `doc_cfg` feature| Guillaume Gomez| rustdoc (Guillaume Gomez) Add a team charter for rustdoc team| Guillaume Gomez| rustdoc (Guillaume Gomez) SVE and SME on AArch64| David Wood| compiler (David Wood), lang (Niko Matsakis), libs (Amanieu d'Antras), types Rust Stabilization of MemorySanitizer and ThreadSanitizer Support| Jakob Koschel| bootstrap, compiler, infra, project-exploit-mitigations Type System Documentation| Boxy| types (Boxy) Unsafe Fields| Jack Wrenn| compiler (Jack Wrenn), lang (Scott McMurray)
blog.rust-lang.org
October 29, 2025 at 12:24 AM
docs.rs: changed default targets
# Changes to default build targets on docs.rs This post announces two changes to the list of default targets used to build documentation on docs.rs. Crate authors can specify a custom list of targets using docs.rs metadata in `Cargo.toml`. If this metadata is not provided, docs.rs falls back to a default list. We are updating this list to better reflect the current state of the Rust ecosystem. ## Apple silicon (ARM64) replaces x86_64 Reflecting Apple's transition from x86_64 to its own ARM64 silicon, the Rust project has updated its platform support tiers. The `aarch64-apple-darwin` target is now Tier 1, while `x86_64-apple-darwin` has moved to Tier 2. You can read more about this in RFC 3671 and RFC 3841. To align with this, docs.rs will now use `aarch64-apple-darwin` as the default target for Apple platforms instead of `x86_64-apple-darwin`. ## Linux ARM64 replaces 32-bit x86 Support for 32-bit `i686` architectures is declining, and major Linux distributions have begun to phase it out. Consequently, we are replacing the `i686-unknown-linux-gnu` target with `aarch64-unknown-linux-gnu` in our default set. ## New default target list The updated list of default targets is: * `x86_64-unknown-linux-gnu` * `aarch64-apple-darwin` (replaces `x86_64-apple-darwin`) * `x86_64-pc-windows-msvc` * `aarch64-unknown-linux-gnu` (replaces `i686-unknown-linux-gnu`) * `i686-pc-windows-msvc` ## Opting out If your crate requires the previous default target list, you can explicitly define it in your `Cargo.toml`: [package.metadata.docs.rs] targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "i686-unknown-linux-gnu", "i686-pc-windows-msvc" ] Note that docs.rs continues to support any target available in the Rust toolchain; only the _default_ list has changed.
blog.rust-lang.org
October 29, 2025 at 12:24 AM
Announcing the New Rust Project Directors
We are happy to announce that we have completed the annual process to elect new Project Directors. The new Project Directors are: * David Wood * Jack Huey * Niko Matsakis They will join Ryan Levick and Carol Nichols to make up the five members of the Rust Foundation Board of Directors who represent the Rust Project. We would also like to thank the outgoing going Project Directors for contributions and service: * Jakob Degen * Santiago Pastorino * Scott McMurray The board is made up of Project Directors, who come from and represent the Rust Project, and Member Directors, who represent the corporate members of the Rust Foundation. Both of these director groups have equal voting power. We look forward to working with and being represented by this new group of project directors. We were fortunate to have a number of excellent candidates and this was a difficult decision. We wish to express our gratitude to all of the candidates who were considered for this role! We also extend our thanks to the project as a whole who participated by nominating candidates and providing additional feedback once the nominees were published. Finally, we want to share our appreciation for Tomas Sedovic for facilitating the election process. An overview of the election process can be found in a previous blog post here.
blog.rust-lang.org
October 28, 2025 at 12:22 AM
crates.io: Malicious crates faster_log and async_println
**Updated September 24th, 2025 17:34:38 UTC** - Socket has also published their own accompanying blog post about the attack. ## Summary On September 24th, the crates.io team was notified by Kirill Boychenko from the Socket Threat Research Team of two malicious crates which were actively searching file contents for Etherum private keys, Solana private keys, and arbitrary byte arrays for exfiltration. These crates were: * `faster_log` - Published on May 25th, 2025, downloaded 7181 times * `async_println` - Published on May 25th, 2025, downloaded 1243 times The malicious code was executed at runtime, when running or testing a project depending on them. Notably, they did not execute any malicious code at build time. Except for their malicious payload, these crates copied the source code, features, and documentation of legitimate crates, using a similar name to them (a case of typosquatting1). ## Actions taken The users in question were immediately disabled, and the crates in question were deleted2 from crates.io shortly after. We have retained copies of all logs associated with the users and the malicious crate files for further analysis. The deletion was performed at 15:34 UTC on September 24, 2025. ## Analysis Both crates were copies of a crate which provided logging functionality, and the logging implementation remained functional in the malicious crates. The original crate had a feature which performed log file packing, which iterated over an associated directories files. The attacker inserted code to perform the malicious action during a log packing operation, which searched the log files being processed from that directory for: * Quoted Ethereum private keys (0x + 64 hex) * Solana-style Base58 secrets * Bracketed byte arrays The crates then proceeded to exfiltrate the results of this search to `https://mainnet[.]solana-rpc-pool[.]workers[.]dev/`. These crates had no dependent downstream crates on crates.io. The malicious users associated with these crates had no other crates or publishes, and the team is actively investigating associative actions in our retained3 logs. ## Thanks Our thanks to Kirill Boychenko from the Socket Threat Research Team for reporting the crates. We also want to thank Carol Nichols from the crates.io team, Pietro Albini from the Rust Security Response WG and Walter Pearce from the Rust Foundation for aiding in the response. 1. typosquatting is a technique used by bad actors to initiate dependency confusion attacks where a legitimate user might be tricked into using a malicious dependency instead of their intended dependency — for example, a bad actor might try to publish a crate at `proc-macro3` to catch users of the legitimate `proc-macro2` crate. ↩ 2. The crates were preserved for future analysis should there be other attacks, and to inform scanning efforts in the future. ↩ 3. One year of logs are retained on crates.io, but only 30 days are immediately available on our log platform. We chose not to go further back in our analysis, since IP address based analysis is limited by the use of dynamic IP addresses in the wild, and the relevant IP address being part of an allocation to a residential ISP. ↩
blog.rust-lang.org
October 6, 2025 at 12:11 AM
Announcing Rust 1.90.0
The Rust team is happy to announce a new version of Rust, 1.90.0. Rust is a programming language empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via `rustup`, you can get 1.90.0 with: $ 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.90.0. If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please report any bugs you might come across! ## What's in 1.90.0 stable # LLD is now the default linker on `x86_64-unknown-linux-gnu` The `x86_64-unknown-linux-gnu` target will now use the LLD linker for linking Rust crates by default. This should result in improved linking performance vs the default Linux linker (BFD), particularly for large binaries, binaries with a lot of debug information, and for incremental rebuilds. In the vast majority of cases, LLD should be backwards compatible with BFD, and you should not see any difference other than reduced compilation time. However, if you do run into any new linker issues, you can always opt out using the `-C linker-features=-lld` compiler flag. Either by adding it to the usual `RUSTFLAGS` environment variable, or to a project's `.cargo/config.toml` configuration file, like so: [target.x86_64-unknown-linux-gnu] rustflags = ["-Clinker-features=-lld"] If you encounter any issues with the LLD linker, please let us know. You can read more about the switch to LLD, some benchmark numbers and the opt out mechanism here. ### Cargo adds native support for workspace publishing `cargo publish --workspace` is now supported, automatically publishing all of the crates in a workspace in the right order (following any dependencies between them). This has long been possible with external tooling or manual ordering of individual publishes, but this brings the functionality into Cargo itself. Native integration allows Cargo's publish verification to run a build across the full set of to-be-published crates _as if_ they were published, including during dry-runs. Note that publishes are still not atomic -- network errors or server-side failures can still lead to a partially published workspace. ### Demoting `x86_64-apple-darwin` to Tier 2 with host tools GitHub will soon discontinue providing free macOS x86_64 runners for public repositories. Apple has also announced their plans for discontinuing support for the x86_64 architecture. In accordance with these changes, as of Rust 1.90, we have demoted the `x86_64-apple-darwin` target from Tier 1 with host tools to Tier 2 with host tools. This means that the target, including tools like `rustc` and `cargo`, will be guaranteed to build but is not guaranteed to pass our automated test suite. For users, this change will not immediately cause impact. Builds of both the standard library and the compiler will still be distributed by the Rust Project for use via `rustup` or alternative installation methods while the target remains at Tier 2. Over time, it's likely that reduced test coverage for this target will cause things to break or fall out of compatibility with no further announcements. ### Stabilized APIs * `u{n}::checked_sub_signed` * `u{n}::overflowing_sub_signed` * `u{n}::saturating_sub_signed` * `u{n}::wrapping_sub_signed` * `impl Copy for IntErrorKind` * `impl Hash for IntErrorKind` * `impl PartialEq<&CStr> for CStr` * `impl PartialEq<CString> for CStr` * `impl PartialEq<Cow<CStr>> for CStr` * `impl PartialEq<&CStr> for CString` * `impl PartialEq<CStr> for CString` * `impl PartialEq<Cow<CStr>> for CString` * `impl PartialEq<&CStr> for Cow<CStr>` * `impl PartialEq<CStr> for Cow<CStr>` * `impl PartialEq<CString> for Cow<CStr>` These previously stable APIs are now stable in const contexts: * `<[T]>::reverse` * `f32::floor` * `f32::ceil` * `f32::trunc` * `f32::fract` * `f32::round` * `f32::round_ties_even` * `f64::floor` * `f64::ceil` * `f64::trunc` * `f64::fract` * `f64::round` * `f64::round_ties_even` ### Platform Support * `x86_64-apple-darwin` is now a tier 2 target Refer to Rust’s platform support page for more information on Rust’s tiered platform support. ### Other changes Check out everything that changed in Rust, Cargo, and Clippy. ## Contributors to 1.90.0 Many people came together to create Rust 1.90.0. We couldn't have done it without all of you. Thanks!
blog.rust-lang.org
October 1, 2025 at 12:10 AM
Rust compiler performance survey 2025 results
Two months ago, we launched the first Rust Compiler Performance Survey, with the goal of helping us understand the biggest pain points of Rust developers related to build performance. It is clear that this topic is very important for the Rust community, as the survey received over 3 700 responses! We would like to thank everyone who participated in the survey, and especially those who described their workflows and challenges with an open answer. We plan to run this survey annually, so that we can observe long-term trends in Rust build performance and its perception. In this post, we'll show some interesting results and insights that we got from the survey and promote work that we have already done recently or that we plan to do to improve the build performance of Rust code. If you would like to examine the complete results of the survey, you can find them here. And now strap in, as there is a lot of data to explore! As this post is relatively long, here is an index of topics that it covers: * Overall satisfaction * Important workflows * Incremental rebuilds * Type checking and IDE performance * Clean and CI builds * Debug information * Workarounds for improving build performance * Understanding why builds are slow ## Overall satisfaction To understand the overall sentiment, we asked our respondents to rate their satisfaction with their build performance, on a scale from 0 (worst) to 10 (best). The average rating was 6, with most people rating their experience with 7 out of 10: PNG] [[SVG] To help us understand the overall build experience in more detail, we also analyzed all open answers (over a thousand of them) written by our respondents, to help us identify several recurring themes, which we will discuss in this post. One thing that is clear from both the satisfaction rating and the open answers is that the build experience differs wildly across users and workflows, and it is not as clear-cut as "Rust builds are slow". We actually received many positive comments about users being happy with Rust build performance, and appreciation for it being improved vastly over the past several years to the point where it stopped being a problem. People also liked to compare their experience with other competing technologies. For example, many people wrote that the build performance of Rust is not worse, or is even better, than what they saw with C++. On the other hand, others noted that the build performance of languages such as Go or Zig is much better than that of Rust. While it is great to see some developers being happy with the state we have today, it is clear that many people are not so lucky, and Rust's build performance limits their productivity. Around 45% respondents who answered that they are no longer using Rust said that at least one of the reasons why they stopped were long compile times. In our survey we received a lot of feedback pointing out real issues and challenges in several areas of build performance, which is what we will focus on in this post. ## Important workflows The challenges that Rust developers experience with build performance are not always as simple as the compiler itself being slow. There are many diverse workflows with competing trade-offs, and optimizing build performance for them might require completely different solutions. Some approaches for improving build performance can also be quite unintuitive. For example, stabilizing certain language features could help remove the need for certain build scripts or proc macros, and thus speed up compilation across the Rust ecosystem. You can watch this talk from RustWeek about build performance to learn more. It is difficult to enumerate all possible build workflows, but we at least tried to ask about workflows that we assumed are common and could limit the productivity of Rust developers the most: PNG] [[SVG] We can see that all the workflows that we asked about cause significant problems to at least a fraction of the respondents, but some of them more so than others. To gain more information about the specific problems that developers face, we also asked a more detailed, follow-up question: PNG] [[SVG] Based on the answers to these two questions and other experiences shared in the open answers, we identified three groups of workflows that we will discuss next: * Incremental rebuilds after making a small change * Type checking using `cargo check` or with a code editor * Clean, from-scratch builds, including CI builds ### Incremental rebuilds Waiting too long for an incremental rebuild after making a small source code change was by far the most common complaint in the open answers that we received, and it was also the most common problem that respondents said they struggle with. Based on our respondents' answers, this comes down to three main bottlenecks: * **Changes in workspaces trigger unnecessary rebuilds.** If you modify a crate in a workspace that has several dependent crates and perform a rebuild, all those dependent crates will currently have to be recompiled. This can cause a lot of unnecessary work and dramatically increase the latency of rebuilds in large (or deep) workspaces. We have some ideas about how to improve this workflow, such as the "Relink, don't rebuild" proposal, but these are currently in a very experimental stage. * **The linking phase is too slow.** This was a very common complaint, and it is indeed a real issue, because unlike the rest of the compilation process, linking is always performed "from scratch". The Rust compiler usually delegates linking to an external/system linker, so its performance is not completely within our hands. However, we are attempting to switch to faster linkers by default. For example, the most popular target (`x86_64-unknown-linux-gnu`) will very soon switch to the LLD linker, which provides significant performance wins. Long-term, it is possible that some linkers (e.g. wild) will allow us to perform even linking incrementally. * **Incremental rebuild of a single crate is too slow.** The performance of this workflow depends on the cleverness of the incremental engine of the Rust compiler. While it is already very sophisticated, there are some parts of the compilation process that are not incremental yet or that are not cached in an optimal way. For example, expansion of derive proc macros is not currently cached, although work is underway to change that. Several users have mentioned that they would like to see Rust perform hot-patching (such as the `subsecond` system used by the Dioxus UI framework or similar approaches used e.g. by the Bevy game engine). While these hot-patching systems are very exciting and can produce truly near-instant rebuild times for specialized use-cases, it should be noted that they also come with many limitations and edge-cases, and it does not seem that a solution that would allow hot-patching to work in a robust way has been found yet. To gauge how long is the typical rebuild latency, we asked our respondents to pick a single Rust project that they work on and which causes them to struggle with build times the most, and tell us how long they have to wait for it to be rebuilt after making a code change. PNG] [[SVG] Even though many developers do not actually experience this latency after each code change, as they consume results of type checking or inline annotations in their code editor, the fact that 55% of respondents have to wait more than ten seconds for a rebuild is far from ideal. If we partition these results based on answers to other questions, it is clear that the rebuild times depend a lot on the size of the project: PNG] [[SVG] And to a lesser factor also on the number of used dependencies: PNG] [[SVG] We would love to get to a point where the time needed to rebuild a Rust project is dependent primarily on the amount of performed code changes, rather than on the size of the codebase, but clearly we are not there yet. ### Type checking and IDE performance Approximately 60% of respondents say that they use `cargo` terminal commands to type check, build or test their code, with `cargo check` being the most commonly used command performed after each code change: PNG] [[SVG] While the performance of `cargo check` does not seem to be as big of a blocker as e.g. incremental rebuilds, it also causes some pain points. One of the most common ones present in the survey responses is the fact that `cargo check` does not share the build cache with `cargo build`. This causes additional compilation to happen when you run e.g. `cargo check` several times to find all type errors, and when it succeeds, you follow up with `cargo build` to actually produce a built artifact. This workflow is an example of competing trade-offs, because sharing the build cache between these two commands by unifying them more would likely make `cargo check` itself slightly slower, which might be undesirable to some users. It is possible that we might be able to find some middle ground to improve the status quo though. You can follow updates to this work in this issue. A related aspect is the latency of type checking in code editors and IDEs. Around 87% of respondents say that they use inline annotations in their editor as the primary mechanism of inspecting compiler errors, and around 33% of them consider waiting for these annotations to be a big blocker. In the open answers, we also received many reports of Rust Analyzer's performance and memory usage being a limiting factor. The maintainers of Rust Analyzer are working hard on improving its performance. Its caching system is being improved to reduce analysis latency, the distributed builds of the editor are now optimized with PGO, which provided 15-20% performance wins, and work is underway to integrate the compiler's new trait solver into Rust Analyzer, which could eventually also result in increased performance. More than 35% users said that they consider the IDE and Cargo blocking one another to be a big problem. There is an existing workaround for this, where you can configure Rust Analyzer to use a different target directory than Cargo, at the cost of increased disk space usage. We realized that this workaround has not been documented in a very visible way, so we added it to the FAQ section of the Rust Analyzer book. ### Clean and CI builds Around 20% of participants responded that clean builds are a significant blocker for them. In order to improve their performance, you can try a recently introduced experimental Cargo and compiler option called `hint-mostly-unused`, which can in certain situations help improve the performance of clean builds, particularly if your dependencies contain a lot of code that might not actually be used by your crate(s). One area where clean builds might happen often is Continuous Integration (CI). 1495 respondents said that they use CI to build Rust code, and around 25% of them consider its performance to be a big blocker for them. However, almost 36% of respondents who consider CI build performance to be a big issue said that they do not use any caching in CI, which we found surprising. One explanation might be that the generated artifacts (the `target` directory) is too large for effective caching, and runs into usage limits of CI providers, which is something that we saw mentioned repeatedly in the open answers section. We have recently introduced an experimental Cargo and compiler option called `-Zembed-metadata` that is designed to reduce the size of the `target` directories, and work is also underway to regularly garbage collect them. This might help with the disk space usage issue somewhat in the future. One additional way to significantly reduce disk usage is to reduce the amount of generated debug information, which brings us to the next section. ## Debug information The default Cargo `dev` profile generates full debug information (debuginfo) both for workspace crates and also all dependencies. This enables stepping through code with a debugger, but it also increases disk usage of the `target` directory, and crucially it makes compilation and linking slower. This effect can be quite large, as our benchmarks show a possible improvement of 2-30% in cycle counts if we reduce the debuginfo level to `line-tables-only` (which only generates enough debuginfo for backtraces to work), and the improvements are even larger if we disable debuginfo generation completely1. However, if Rust developers debug their code after most builds, then this cost might be justified. We thus asked them how often they use a debugger to debug their Rust code: PNG] [[SVG] Based on these results, it seems that the respondents of our survey do not actually use a debugger all that much2. However, when we asked people if they require debuginfo to be generated by default, the responses were much less clear-cut: PNG] [[SVG] This is the problem with changing defaults: it is challenging to improve the workflows of one user without regressing the workflow of another. For completeness, here are the answers to the previous question partitioned on the answer to the "How often do you use a debugger" question: PNG] [[SVG] It was surprising for us to see that around a quarter of respondents who (almost) never use a debugger still want to have full debuginfo generated by default. Of course, you can always disable debuginfo manually to improve your build performance, but not everyone knows about that option, and defaults matter a lot. The Cargo team is considering ways of changing the status quo, for example by reducing the level of generated debug information in the `dev` profile, and introducing a new built-in profile designed for debugging. ## Workarounds for improving build performance Build performance of Rust is affected by many different aspects, including the configuration of the build system (usually Cargo) and the Rust compiler, but also the organization of Rust crates and used source code patterns. There are thus several approaches that can be used to improve build performance by either using different configuration options or restructuring source code. We asked our respondents if they are even aware of such possibilities, whether they have tried them and how effective they were: PNG] [[SVG] It seems that the most popular (and effective) mechanisms for improving build performance are reducing the number of dependencies and their activated features, and splitting larger crates into smaller crates. The most common way of improving build performance without making source code changes seems to be the usage of an alternative linker. It seems that especially the mold and LLD linkers are very popular: PNG] [SVG] [[Wordcloud of open answers] We have good news here! The most popular `x86_64-unknown-linux-gnu` Linux target will start using the LLD linker in the next Rust stable release, resulting in faster link times _by default_. Over time, we will be able to evaluate how disruptive is this change to the overall Rust ecosystem, and whether we could e.g. switch to a different (even faster) linker. ### Build performance guide We were surprised by the relatively large number of users who were unaware of some approaches for improving compilation times, in particular those that are very easy to try and typically do not require source code changes (such as reducing debuginfo or using a different linker or a codegen backend). Furthermore, almost 42% of respondents have not tried to use _any_ mechanism for improving build performance whatsoever. While this is not totally unexpected, as some of these mechanisms require using the nightly toolchain or making non-trivial changes to source code, we think that one the reasons is also simply that Rust developers might not know about these mechanisms being available. In the open answers, several people also noted that they would appreciate if there was some sort of official guidance from the Rust Project about such mechanisms for improving compile times. It should be noted that the mechanisms that we asked about are in fact workarounds that present various trade-offs, and these should always be carefully considered. Several people have expressed dissatisfaction with some of these workarounds in the open answers, as they find it unacceptable to modify their code (which could sometimes result e.g. in increased maintenance costs or worse runtime performance) just to achieve reasonable compile times. Nevertheless, these workarounds can still be incredibly useful in some cases. The feedback that we received shows that it might be beneficial to spread awareness of these mechanisms in the Rust community more, as some of them can make a really large difference in build performance, but also to candidly explain the trade-offs that they introduce. Even though several great resources that cover this topic already exist online, we decided to create an official guide for optimizing build performance (currently work-in-progress), which will likely be hosted in the Cargo book. The aim of this guide is to increase the awareness of various mechanisms for improving build performance, and also provide a framework for evaluating their trade-offs. Our long-standing goal is to make compilation so fast that similar workarounds will not be necessary anymore for the vast majority of use-cases. However, there is no free lunch, and the combination of Rust's strong type system guarantees, its compilation model and also heavy focus on runtime performance often go against very fast (re)build performance, and might require usage of at least some workarounds. We hope that this guide will help Rust developers learn about them and evaluate them for their specific use-case. ## Understanding why builds are slow When Rust developers experience slow builds, it can be challenging to identify where exactly is the compilation process spending time, and what could be the bottleneck. It seems that only very few Rust developers leverage tools for profiling their builds: PNG] [[SVG] This hardly comes as a surprise. There are currently not that many ways of intuitively understanding the performance characteristics of Cargo and `rustc`. Some tools offer only a limited amount of information (e.g. `cargo build --timings`), and the output of others (e.g. `-Zself-profile`) is very hard to interpret without knowledge of the compiler internals. To slightly improve this situation, we have recently added support for displaying link times to the `cargo build --timings` output, to provide more information about the possible bottleneck in crate compilation (note this feature has not been stabilized yet). Long-term, it would be great to have tooling that could help Rust developers diagnose compilation bottlenecks in their crates without them having to understand how the compiler works. For example, it could help answer questions such as "Which code had to be recompiled after a given source change" or "Which (proc) macros take the longest time to expand or produce the largest output", and ideally even offer some actionable suggestions. We plan to work on such tooling, but it will take time to manifest. One approach that could help Rust compiler contributors understand why are Rust (re)builds slow "in the wild" is the opt-in compilation metrics collection initiative. ## What's next There are more interesting things in the survey results, for example how do answers to selected questions differ based on the used operating system. You can examine the full results in the full report PDF. We would like to thank once more everyone who has participated in our survey. It helped us understand which workflows are the most painful for Rust developers, and especially the open answers provided several great suggestions that we tried to act upon. Even though the Rust compiler is getting increasingly faster every year, we understand that many Rust developers require truly significant improvements to improve their productivity, rather than "just" incremental performance wins. Our goal for the future is to finally stabilize long-standing initiatives that could improve build performance a lot, such as the Cranelift codegen backend or the parallel compiler frontend. One such initiative (using a faster linker by default) will finally land soon, but the fact that it took many years shows how difficult it is to make such large cutting changes to the compilation process. There are other ambitious ideas for reducing (re)build times, such as avoiding unnecessary workspace rebuilds or e.g. using some form of incremental linking, but these will require a lot of work and design discussions. We know that some people are wondering why it takes so much time to achieve progress in improving the build performance of Rust. The answer is relatively simple. These changes require a lot of work, domain knowledge (that takes a relatively long time to acquire) and many discussions and code reviews, and the pool of people that have time and motivation to work on them or review these changes is very limited. Current compiler maintainers and contributors (many of whom work on the compiler as volunteers, without any funding) work very hard to keep up with maintaining the compiler and keeping it working with the high-quality bar that Rust developers expect, across many targets, platforms and operating systems. Introducing large structural changes, which are likely needed to reach massive performance improvements, would require a lot of concentrated effort and funding. 1. This benchmark was already performed using the fast LLD linker. If a slower linker was used, the build time wins would likely be even larger. ↩ 2. Potentially because of the strong invariants upheld by the Rust type system, and partly also because the Rust debugging experience might not be optimal for many users, which is a feedback that we received in the State of Rust 2024 survey. ↩
blog.rust-lang.org
September 23, 2025 at 12:00 AM
Welcoming the Rust Innovation Lab
TL;DR: Rustls is the inaugural project of the Rust Innovation Lab, which is a new home for Rust projects under the Rust Foundation. At the Rust Foundation's August meeting, the Project Directors and the rest of the Rust Foundation board voted to approve Rustls as the first project housed under the newly formed Rust Innovation Lab. Prior to the vote, the Project Directors consulted with the Leadership Council who confirmed the Project's support for this initiative. The Rust Innovation Lab (RIL) is designed to provide support for funded Rust-based open source projects from the Rust Foundation in the form of governance, legal, networking, marketing, and administration, while keeping the technical direction solely in the hands of the current maintainers. As with the other work of the Rust Foundation (e.g. its many existing initiatives), the purpose of the RIL is to strengthen the Rust ecosystem generally. The Foundation has been working behind the scenes to establish the Rust Innovation Lab, which includes setting up infrastructure under the Foundation to ensure smooth transition for Rustls into RIL. More details are available in the Foundation's announcement and on the Rust Innovation Lab's page. We are all excited by the formation of the Rust Innovation Lab. The support this initiative will provide to Rustls (and, eventually, other important projects that are using Rust) will improve software security for the entire industry. The Rust Project is grateful for the support of the Rust Foundation corporate members who are making this initiative possible for the benefit of everyone. More information on the criteria for projects wishing to become part of the RIL and the process for applying will be coming soon. The Project Directors and Leadership Council have been and will continue working with the Foundation to communicate information, questions, and feedback with the Rust community about the RIL as the details are worked out.
blog.rust-lang.org
September 16, 2025 at 11:57 PM
Faster linking times with 1.90.0 stable on Linux using the LLD linker
TL;DR: rustc will start using the LLD linker by default on the `x86_64-unknown-linux-gnu` target starting with the next stable release (1.90.0, scheduled for 2025-09-18), which should significantly reduce linking times. Test it out on beta now, and please report any encountered issues. #### Some context Linking time is often a big part of compilation time. When rustc needs to build a binary or a shared library, it will usually call the default linker installed on the system to do that (this can be changed on the command-line or by the target for which the code is compiled). The linkers do an important job, with concerns about stability, backwards-compatibility and so on. For these and other reasons, on the most popular operating systems they usually are older programs, designed when computers only had a single core. So, they usually tend to be slow on a modern machine. For example, when building ripgrep 13 in debug mode on Linux, roughly half of the time is actually spent in the linker. There are different linkers, however, and the usual advice to improve linking times is to use one of these newer and faster linkers, like LLVM's `lld` or Rui Ueyama's `mold`. Some of Rust's wasm and aarch64 targets already use `lld` by default. When using rustup, rustc ships with a version of `lld` for this purpose. When CI builds LLVM to use in the compiler, it also builds the linker and packages it. It's referred to as `rust-lld` to avoid colliding with any `lld` already installed on the user's machine. Since improvements to linking times are substantial, it would be a good default to use in the most popular targets. This has been discussed for a long time, for example in issues #39915 and #71515. To expand our testing, we have enabled rustc to use `rust-lld` by default on nightly, in May 2024. No major issues have been reported since then. We believe we've done all the internal testing that we could, on CI, crater, on our benchmarking infrastructure and on nightly, and plan to enable `rust-lld` to be the linker used by default on `x86_64-unknown-linux-gnu` for stable builds in 1.90.0. #### Benefits While this also enables the compiler to use more linker features in the future, the most immediate benefit is much improved linking times. Here are more details from the ripgrep example mentioned above: for an incremental rebuild, linking is reduced 7x, resulting in a 40% reduction in end-to-end compilation times. For a from-scratch debug build, it is a 20% improvement. Most binaries should see some improvements here, but it's especially significant with e.g. bigger binaries, or for incremental rebuilds, or when involving debuginfo. These usually see bottlenecks in the linker. Here's a link to the complete results from our benchmarks. #### Possible drawbacks From our prior testing, we don't really expect issues to happen in practice. It is a drop-in replacement for the vast majority of cases, but `lld` is not _bug-for-bug_ compatible with GNU ld. In any case, using `rust-lld` can be disabled if any problem occurs: use the `-C linker-features=-lld` flag to revert to using the system's default linker. Some crates somehow relying on these differences could need additional link args, though we also expect this to be quite rare. Let us know if you encounter problems, by opening an issue on GitHub. Some of the big gains in performance come from parallelism, which could be undesirable in resource-constrained environments, or for heavy projects that are already reaching hardware limits. #### Summary, and call for testing rustc will use `rust-lld` on `x86_64-unknown-linux-gnu`, starting with the 1.90.0 stable release, for much improved linking times. Rust 1.90.0 will be released next month, on the 18th of September 2025. This linker change is already available on the current beta (`1.90.0-beta.6`). To help everyone prepare for this landing on stable, please test your projects on beta and let us know if you encounter problems, by opening an issue on GitHub. If that happens, you can revert to the default linker with the `-C linker-features=-lld` flag. Either by adding it to the usual `RUSTFLAGS` environment variable, or to a project's `.cargo/config.toml` configuration file, like so: [target.x86_64-unknown-linux-gnu] rustflags = ["-Clinker-features=-lld"]
blog.rust-lang.org
September 8, 2025 at 11:56 PM
Demoting x86_64-apple-darwin to Tier 2 with host tools
In Rust 1.90.0, the target `x86_64-apple-darwin` will be demoted to Tier 2 with host tools. The standard library and the compiler will continue to be built and distributed, but automated tests of these components are no longer guaranteed to be run. ## Background Rust has supported macOS for a long time, with some amount of support dating back to Rust 0.1 and likely before that. During that time period, Apple has changed CPU architectures from x86 to x86_64 and now to Apple silicon, ultimately announcing the end of support for the x86_64 architecture. Similarly, GitHub has announced that they will no longer provide free macOS x86_64 runners for public repositories. The Rust Project uses these runners to execute automated tests for the `x86_64-apple-darwin` target. Since the target tier policy requires that Tier 1 platforms must run tests in CI, the `x86_64-apple-darwin` target must be demoted to Tier 2. ## What changes? Starting with Rust 1.90.0, `x86_64-apple-darwin` will be Tier 2 with host tools. For users, nothing will change immediately; builds of both the standard library and the compiler will still be distributed by the Rust Project for use via `rustup` or alternative installation methods. Over time, this target will likely accumulate bugs faster due to reduced testing. ## Future If the `x86_64-apple-darwin` target causes concrete problems, it may be demoted further. No plans for further demotion have been made yet. For more details on the motivation of the demotion, see RFC 3841.
blog.rust-lang.org
August 26, 2025 at 11:45 PM
Announcing Rust 1.89.0
The Rust team is happy to announce a new version of Rust, 1.89.0. Rust is a programming language empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via `rustup`, you can get 1.89.0 with: $ 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.89.0. If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please report any bugs you might come across! ## What's in 1.89.0 stable ### Explicitly inferred arguments to const generics Rust now supports `_` as an argument to const generic parameters, inferring the value from surrounding context: pub fn all_false<const LEN: usize>() -> [bool; LEN] { [false; _] } Similar to the rules for when `_` is permitted as a type, `_` is not permitted as an argument to const generics when in a signature: // This is not allowed pub const fn all_false<const LEN: usize>() -> [bool; _] { [false; LEN] } // Neither is this pub const ALL_FALSE: [bool; _] = all_false::<10>(); ### Mismatched lifetime syntaxes lint Lifetime elision in function signatures is an ergonomic aspect of the Rust language, but it can also be a stumbling point for newcomers and experts alike. This is especially true when lifetimes are inferred in types where it isn't syntactically obvious that a lifetime is even present: // The returned type `std::slice::Iter` has a lifetime, // but there's no visual indication of that. // // Lifetime elision infers the lifetime of the return // type to be the same as that of `scores`. fn items(scores: &[u8]) -> std::slice::Iter<u8> { scores.iter() } Code like this will now produce a warning by default: warning: hiding a lifetime that's elided elsewhere is confusing --> src/lib.rs:1:18 | 1 | fn items(scores: &[u8]) -> std::slice::Iter<u8> { | ^^^^^ -------------------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: use `'_` for type paths | 1 | fn items(scores: &[u8]) -> std::slice::Iter<'_, u8> { | +++ We first attempted to improve this situation back in 2018 as part of the `rust_2018_idioms` lint group, but strong feedback about the `elided_lifetimes_in_paths` lint showed that it was too blunt of a hammer as it warns about lifetimes which don't matter to understand the function: use std::fmt; struct Greeting; impl fmt::Display for Greeting { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { // -----^^^^^^^^^ expected lifetime parameter // Knowing that `Formatter` has a lifetime does not help the programmer "howdy".fmt(f) } } We then realized that the confusion we want to eliminate occurs when both 1. lifetime elision inference rules _connect_ an input lifetime to an output lifetime 2. it's not syntactically obvious that a lifetime exists There are two pieces of Rust syntax that indicate that a lifetime exists: `&` and `'`, with `'` being subdivided into the inferred lifetime `'_` and named lifetimes `'a`. When a type uses a named lifetime, lifetime elision will not infer a lifetime for that type. Using these criteria, we can construct three groups: Self-evident it has a lifetime| Allow lifetime elision to infer a lifetime| Examples ---|---|--- No| Yes| `ContainsLifetime` Yes| Yes| `&T`, `&'_ T`, `ContainsLifetime<'_>` Yes| No| `&'a T`, `ContainsLifetime<'a>` The `mismatched_lifetime_syntaxes` lint checks that the inputs and outputs of a function belong to the same group. For the initial motivating example above, `&[u8]` falls into the second group while `std::slice::Iter<u8>` falls into the first group. We say that the lifetimes in the first group are _hidden_. Because the input and output lifetimes belong to different groups, the lint will warn about this function, reducing confusion about when a value has a meaningful lifetime that isn't visually obvious. The `mismatched_lifetime_syntaxes` lint supersedes the `elided_named_lifetimes` lint, which did something similar for named lifetimes specifically. Future work on the `elided_lifetimes_in_paths` lint intends to split it into more focused sub-lints with an eye to warning about a subset of them eventually. ### More x86 target features The `target_feature` attribute now supports the `sha512`, `sm3`, `sm4`, `kl` and `widekl` target features on x86. Additionally a number of `avx512` intrinsics and target features are also supported on x86: #[target_feature(enable = "avx512bw")] pub fn cool_simd_code(/* .. */) -> /* ... */ { /* ... */ } ### Cross-compiled doctests Doctests will now be tested when running `cargo test --doc --target other_target`, this may result in some amount of breakage due to would-be-failing doctests now being tested. Failing tests can be disabled by annotating the doctest with `ignore-<target>` (docs): /// ```ignore-x86_64 /// panic!("something") /// ``` pub fn my_function() { } ### `i128` and `u128` in `extern "C"` functions `i128` and `u128` no longer trigger the `improper_ctypes_definitions` lint, meaning these types may be used in `extern "C"` functions without warning. This comes with some caveats: * The Rust types are ABI- and layout-compatible with (unsigned) `__int128` in C when the type is available. * On platforms where `__int128` is not available, `i128` and `u128` do not necessarily align with any C type. * `i128` is _not_ necessarily compatible with `_BitInt(128)` on any platform, because `_BitInt(128)` and `__int128` may not have the same ABI (as is the case on x86-64). This is the last bit of follow up to the layout changes from last year: https://blog.rust-lang.org/2024/03/30/i128-layout-update. ### Demoting `x86_64-apple-darwin` to Tier 2 with host tools GitHub will soon discontinue providing free macOS x86_64 runners for public repositories. Apple has also announced their plans for discontinuing support for the x86_64 architecture. In accordance with these changes, the Rust project is in the process of demoting the `x86_64-apple-darwin` target from Tier 1 with host tools to Tier 2 with host tools. This means that the target, including tools like `rustc` and `cargo`, will be guaranteed to build but is not guaranteed to pass our automated test suite. We expect that the RFC for the demotion to Tier 2 with host tools will be accepted between the releases of Rust 1.89 and 1.90, which means that Rust 1.89 will be the last release of Rust where `x86_64-apple-darwin` is a Tier 1 target. For users, this change will not immediately cause impact. Builds of both the standard library and the compiler will still be distributed by the Rust Project for use via `rustup` or alternative installation methods while the target remains at Tier 2. Over time, it's likely that reduced test coverage for this target will cause things to break or fall out of compatibility with no further announcements. ### Standards Compliant C ABI on the `wasm32-unknown-unknown` target `extern "C"` functions on the `wasm32-unknown-unknown` target now have a standards compliant ABI. See this blog post for more information: https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown. ### Platform Support * `x86_64-apple-darwin` is in the process of being demoted to Tier 2 with host tools * Add new Tier-3 targets `loongarch32-unknown-none` and `loongarch32-unknown-none-softfloat` Refer to Rust’s platform support page for more information on Rust’s tiered platform support. ### Stabilized APIs * `NonZero<char>` * Many intrinsics for x86, not enumerated here * AVX512 intrinsics * `SHA512`, `SM3` and `SM4` intrinsics * `File::lock` * `File::lock_shared` * `File::try_lock` * `File::try_lock_shared` * `File::unlock` * `NonNull::from_ref` * `NonNull::from_mut` * `NonNull::without_provenance` * `NonNull::with_exposed_provenance` * `NonNull::expose_provenance` * `OsString::leak` * `PathBuf::leak` * `Result::flatten` * `std::os::linux::net::TcpStreamExt::quickack` * `std::os::linux::net::TcpStreamExt::set_quickack` These previously stable APIs are now stable in const contexts: * `<[T; N]>::as_mut_slice` * `<[u8]>::eq_ignore_ascii_case` * `str::eq_ignore_ascii_case` ### Other changes Check out everything that changed in Rust, Cargo, and Clippy. ## Contributors to 1.89.0 Many people came together to create Rust 1.89.0. We couldn't have done it without all of you. Thanks!
blog.rust-lang.org
August 14, 2025 at 11:45 PM
Project goals update — July 2025
The Rust Project is currently working towards a slate of 40 project goals, with 3 of them designated as flagship goals. This post provides selected updates on our progress towards these goals (or, in some cases, lack thereof). The full details for any particular goal are available in its associated tracking issue on the rust-project-goals repository. This is the final update for the first half of 2025. We're in the process of selecting goals for the second half of the year. Here are the goals that are currently proposed for 2025H2. ## Flagship goals **Bring the Async Rust experience closer to parity with sync Rust** **Why this goal?** This work continues our drive to improve support for async programming in Rust. In 2024H2 we stabilized async closures; explored the generator design space; and began work on the `dynosaur` crate, an experimental proc-macro to provide dynamic dispatch for async functions in traits. In 2025H1 our plan is to deliver (1) improved support for async-fn-in-traits, completely subsuming the functionality of the `async-trait` crate; (2) progress towards sync and async generators, simplifying the creation of iterators and async data streams; (3) and improve the ergonomics of `Pin`, making lower-level async coding more approachable. These items together start to unblock the creation of the next generation of async libraries in the wider ecosystem, as progress there has been blocked on a stable solution for async traits and streams. **H1 Recap from @tmandry:** **What went well** : This cycle we saw significant progress in a few areas: * We had productive conversations with the language team on generators, and landed an experimental implementation for a builtin `iter!` macro that implements unpinned generators. * We shipped async closures and the new lifetime capture rules as part of Rust 2024. * We developed a proc macro, dynosaur, that can be used to support `async fn` together with `dyn Trait`. * We landed an early-stage experiment to support `async Drop` in the compiler. * We landed an experimental implementation of autoreborrowing for pinned references, along with a number of other improvements for pin ergonomics. **What didn't:** In some areas, we didn't make as much progress as we hoped. In retrospect, the scope of this goal was too large for one person to manage. With flagship project goals, there this a desire to paint a grand vision that I think would be better served by another mechanism without a time bound on it. I've been calling this a "north star". In some cases, like RTN, progress has been by technical debt in the Rust compiler's type system. For that there is an ongoing project goal to replace the trait solver with a next-generation version. Finally, on the design front, progress is sometimes slowed by uncertainty and disagreement around the future of pinning in the Rust language. **Looking forward:** My takeaway from this is that in the next project goals cycle, we should focus on answering more fundamental questions of Rust's evolution. These should reduce uncertainty and pave the way for us to unblock major features for async in future cycles. For example, how far we can push pin ergonomics? What approach should we take for in-place initialization, and can it support `async fn` in `dyn Trait`? How will we support evolving trait hierarchies in a general way that allows us to support the Tower "middleware" pattern with `async fn`? I'm excited by the lineup of goals we have for this next cycle. See you on the other side! 2 detailed updates available. Comment by @tmandry posted on 2025-07-17: > dynosaur v0.3 has been released. This release contains some breaking changes in preparation for an upcoming 1.0 release. See the linked release notes for more details. Comment by @tmandry posted on 2025-07-30: > **H1 Recap** > > **What went well** : This cycle we saw significant progress in a few areas: > > * We had productive conversations with the language team on generators, and landed an experimental implementation for a builtin `iter!` macro that implements unpinned generators. > * We shipped async closures and the new lifetime capture rules as part of Rust 2024. > * We developed a proc macro, dynosaur, that can be used to support `async fn` together with `dyn Trait`. > * We landed an early-stage experiment to support `async Drop` in the compiler. > * We landed an experimental implementation of autoreborrowing for pinned references, along with a number of other improvements for pin ergonomics. > > > **What didn't:** In some areas, we didn't make as much progress as we hoped. In retrospect, the scope of this goal was too large for one person to manage. With flagship project goals, there this a desire to paint a grand vision that I think would be better served by another mechanism without a time bound on it. I've been calling this a "north star". > > In some cases, like RTN, progress has been by technical debt in the Rust compiler's type system. For that there is an ongoing project goal to replace the trait solver with a next-generation version. Finally, on the design front, progress is sometimes slowed by uncertainty and disagreement around the future of pinning in the Rust language. > > **Looking forward:** My takeaway from this is that in the next project goals cycle, we should focus on answering more fundamental questions of Rust's evolution. These should reduce uncertainty and pave the way for us to unblock major features for async in future cycles. For example, how far we can push pin ergonomics? What approach should we take for in-place initialization, and can it support `async fn` in `dyn Trait`? How will we support evolving trait hierarchies in a general way that allows us to support the Tower "middleware" pattern with `async fn`? > > I'm excited by the lineup of goals we have for this next cycle. See you on the other side! **Organize Rust All-Hands 2025** **Why this goal?** May 15, 2025 marks the 10-year anniversary of Rust's 1.0 release; it also marks 10 years since the creation of the Rust subteams. At the time there were 6 Rust teams with 24 people in total. There are now 57 teams with 166 people. In-person All Hands meetings are an effective way to help these maintainers get to know one another with high-bandwidth discussions. This year, the Rust Project will be coming together for RustWeek 2025, a joint event organized with RustNL. Participating project teams will use the time to share knowledge, make plans, or just get to know one another better. One particular goal for the All Hands is reviewing a draft of the Rust Vision Doc, a document that aims to take stock of where Rust is and lay out high-level goals for the next few years. **Stabilize tooling needed by Rust for Linux** **Why this goal?** This goal continues our work from 2024H2 in supporting the experimental support for Rust development in the Linux kernel. Whereas in 2024H2 we were focused on stabilizing required language features, our focus in 2025H1 is stabilizing compiler flags and tooling options. We will (1) implement RFC #3716 which lays out a design for ABI-modifying flags; (2) take the first step towards stabilizing `build-std` by creating a stable way to rebuild core with specific compiler options; (3) extending rustdoc, clippy, and the compiler with features that extract metadata for integration into other build systems (in this case, the kernel's build system). **What has happened?** * Ding opened a PR#142518 that implements the in-place initialization experiment. * Ding is working on an experimental implementation (PR#143527) for `arbitrary_self_types`. * Ding opened a PR to Clang (a C frontend for LLVM): Queries on GCC-style inline assembly statements and got it merged. * @ojeda opened two Rust for Linux goals for the next period: * https://github.com/rust-lang/rust-project-goals/pull/347 * https://github.com/rust-lang/rust-project-goals/pull/346 2 detailed updates available. Comment by @tomassedovic posted on 2025-07-07: > ## In-place initialization > > Ding opened a PR#142518 that implements the in-place initialization experiment. > > ## `arbitrary_self_types` > > Ding is working on an experimental implementation (PR#143527). > > ## Queries on GCC-style inline assembly statements: > > Ding opened a PR to Clang (a C frontend for LLVM): https://github.com/llvm/llvm-project/pull/143424 and got it merged. > > This is part of the LLVM/Clang issues the Rust for Linux project needs: https://github.com/Rust-for-Linux/linux/issues/1132. > > ## `-Zindirect-branch-cs-prefix`: > > We've discussed whether this needs to be a separate target feature vs. a modifier on the existing `retpoline` one. Josh argued that since having this enabled without retpoline doesn't make sense, it should be a modifier. On the other hand, Miguel mentioned that it would be clearer on the user's side (easier to map the names from GCC and Clang to `rustc` when they're the same and see that we're enabling the same thing in Rust and Linux kernel's `Makefiles`). > > It seems that `-Cmin-function-alignment` will be another similar case. > > Ultimately, this is a compiler question and should be resolved here: https://github.com/rust-lang/rust/pull/140740 > > The Rust for Linux team was asked to submit a new MCP (Major Change Proposal) for the `-Zindirect-branch-cs-prefix` flag. @ojeda opened it here: https://github.com/rust-lang/compiler-team/issues/899 and it's now been accepted. > > ## Stabilizing `AddressSanitizer` and `LeakSanitizer`: > > * https://github.com/rust-lang/rust/pull/123617 > * https://github.com/rust-lang/rust/pull/142681 > > > In light of the newly-proposed `#[sanitize(xyz = "on|off")]` syntax, we've discussed whether it makes sense to add a shorthand to enable/disable all of them at once (e.g. `#[sanitize(all = "on|off")]`). The experience from the field suggests that this is rarely something people do. > > We've also discussed what values should the options have (e.g. `"yes"`/`"no"` vs. `"on"`/`"off"` or `true`/`false`). No strong preferences, but in case of an error, the compiler should suggest the correct value to use. > > P.S.: There will be a Lang design meeting regarding in-place initialization on Wednesday 2025-07-30: https://github.com/rust-lang/lang-team/issues/332. Comment by @tomassedovic posted on 2025-07-18: > ## 2025H2 Goals > > @ojeda proposed two goals to move the effort forward: one for the language and the other for the compiler. > > * https://github.com/rust-lang/rust-project-goals/pull/347 > * https://github.com/rust-lang/rust-project-goals/pull/346 > > > ## Ongoing work updates > > @dingxiangfei2009 drafted a Pre-RFC for the supertrait-item-in-subtrait-impl work. Need to add two modifications to the RFC to incorporate t-lang requests. ## Goals looking for help **Promoting Parallel Front End** _Help wanted:_ Help test the deadlock code in the issue list and try to reproduce the issue 1 detailed update available. Comment by @SparrowLii posted on 2025-07-11: > * **Key developments:** We bring rustc-rayon in rustc's working tree, the PR that fixes several deadlock issues has been merged. > * **Blockers:** null > * **Help wanted:** Help test the deadlock code in the issue list and try to reproduce the issue > **Stabilize public/private dependencies** _Help wanted:_ this project goal needs a compiler developer to move forward. 3 detailed updates available. Comment by @epage posted on 2025-07-10: > Help wanted: this project goal needs a compiler developer to move forward. Comment by @sladyn98 posted on 2025-07-11: > @epage hey i would like to help contribute with this, if you could probably mentor me in the right direction, i could learn and ramp up and move this forward, i could start with some tasks, scope them out into small bite sized chunks and contribute Comment by @epage posted on 2025-07-11: > This is mostly in the compiler atm and I'm not in a position to mentor or review compiler changes; my first compiler PR is being merged right now. I'm mostly on this from the Cargo side and overall coordination. **Stabilize cargo-script** _Help wanted_ : I'll be working towards verifying rustfmt, rust-analyzer, and other tooling support and will be needing at least reviews from people, if not some mentorship. 1 detailed update available. Comment by @epage posted on 2025-07-10: > Key developments: > > * @epage is shifting attention back to this now that toml v0.9 is out > * `-Zunpretty` support is being added in rust-lang/rust#143708 > > > Blockers > > Help wanted > > * I'll be working towards verifying rustfmt, rust-analyzer, and other tooling support and will be needing at least reviews from people, if not some mentorship. > ## Other goal updates **" Stabilizable" prototype for expanded const generics** 1 detailed update available. Comment by @BoxyUwU posted on 2025-07-25: > Not much to say since the last update- I have been focused on other areas of const generics and I believe camelid has been relatively busy with other things too. I intend for the next const generics project goal to be more broadly scoped than just `min_generic_const_args` so that other const generics work can be given a summary here :) **build-std** * Discussed the latest round of feedback on the pre-RFC, the most significant of which is that the scope of the RFC is almost certainly too large for an MVP. * @davidtwco presented a reformulation of the plan which focuses on the core components of build-std and leaves more features for future extensions after a minimal MVP: * Stage 1a: Introduce manual controls for enabling the build-std behavior in Cargo. * Stage 1b: Introduce Cargo syntax to declare explicit dependencies on core, alloc and std crates. * This stage enables the use of Tier 3 targets on stable Rust and allows the ecosystem to start transitioning to explicit dependencies on the standard library. * This stage would be considered the minimal MVP. * Stage 2: Teach Cargo to build std with different codegen/target modifier options. * This stage allows the standard library to be compiled with custom codegen options. * Stage 3: Enable automatic standard library rebuilds. * This stage focuses on making build-std behave ergonomically and naturally without users having to manually ask for the standard library to be built. * General consensus was reached that this plan feels viable. @davidtwco will write the Stage 1a/b RFC. * Submitted a 2025H2 goal proposal 2 detailed updates available. Comment by @wesleywiser posted on 2025-07-22: > * Updates from our biweekly sync call: > * Discussed the latest round of feedback on the pre-RFC, the most significant of which is that the scope of the RFC is almost certainly too large for an MVP. > * @davidtwco presented a reformulation of the plan which focuses on the core components of build-std and leaves more features for future extensions after a minimal MVP: > * Stage 1a: Introduce manual controls for enabling the build-std behavior in Cargo. > * Stage 1b: Introduce Cargo syntax to declare explicit dependencies on core, alloc and std crates. > * This stage enables the use of Tier 3 targets on stable Rust and allows the ecosystem to start transitioning to explicit dependencies on the standard library. > * This stage would be considered the minimal MVP. > * Stage 2: Teach Cargo to build std with different codegen/target modifier options. > * This stage allows the standard library to be compiled with custom codegen options. > * Stage 3: Enable automatic standard library rebuilds. > * This stage focuses on making build-std behave ergonomically and naturally without users having to manually ask for the standard library to be built. > * General consensus was reached that this plan feels viable. @davidtwco will write the Stage 1a/b RFC. > * Some discussion on various threads from the previous RFC draft. > Comment by @wesleywiser posted on 2025-07-28: > Continuing the build-std work has been submitted as a Project Goal for 2025H2: https://rust-lang.github.io/rust-project-goals/2025h2/build-std.html **Continue resolving `cargo-semver-checks` blockers for merging into cargo** Belated update for May and June: RustWeek was _extremely_ productive! It was great to sit down in a room with all the stakeholders and talk about what it would take to get cross-crate linting working reliably at scale. As a result of this work we identified a lot of previously-unknown blockers, as well as some paths forward. More work remains, but it's nice that we now have a much better idea of what that work should look like. TL;DR: * `?Sized` linting is blocked since it requires additional data in rustdoc JSON. * Currently we get information on the _syntactic_ presence of `?Sized`. But another bound might be implying `Sized`, which makes `?Sized` not true overall. * Failing to account for this would mean we get both false negatives and false positives. This is effectively a dual of the the "implied bounds" issue in the previous post. * Cross-crate linting has had some positive movement, and some additional blockers identified. * docs.rs has begun hosting rustdoc JSON, allowing us to use it as a cache to avoid rebuilding rustdoc JSON in cross-crate linting scenarios where those builds could get expensive. * We need a way to determine which features in dependencies are active (recursively) given a set of features active in the the top crate, so we know how to generate accurate rustdoc JSON. That information is not currently available via the lockfile or any cargo interface. * We need to work with the rustdoc and cargo teams to make it possible to use rmeta files to correctly combine data across crates. This has many moving parts and will take time to get right, but based on in-person conversations at RustWeek we all agreed was the best and most reliable path forward. * Other improvements to `cargo-semver-checks` are ongoing: a full set of `#[target_feature]` lints ships in the next release, and two folks participating in Google Summer of Code have begun contributing to `cargo-semver-checks` already! While the targets for the 2025H1 goals proved a bit too ambitious to hit in this timeline, I'm looking forward to continuing my work on the goal in the 2025H2 period! 1 detailed update available. Comment by @obi1kenobi posted on 2025-07-04: > Belated update for May and June: RustWeek was _extremely_ productive! It was great to sit down in a room with all the stakeholders and talk about what it would take to get cross-crate linting working reliably at scale. > > As a result of this work we identified a lot of previously-unknown blockers, as well as some paths forward. More work remains, but it's nice that we now have a much better idea of what that work should look like. > > TL;DR: > > * `?Sized` linting is blocked since it requires additional data in rustdoc JSON. > * Currently we get information on the _syntactic_ presence of `?Sized`. But another bound might be implying `Sized`, which makes `?Sized` not true overall. > * Failing to account for this would mean we get both false negatives and false positives. This is effectively a dual of the the "implied bounds" issue in the previous post. > * Cross-crate linting has had some positive movement, and some additional blockers identified. > * docs.rs has begun hosting rustdoc JSON, allowing us to use it as a cache to avoid rebuilding rustdoc JSON in cross-crate linting scenarios where those builds could get expensive. > * We need a way to determine which features in dependencies are active (recursively) given a set of features active in the the top crate, so we know how to generate accurate rustdoc JSON. That information is not currently available via the lockfile or any cargo interface. > * We need to work with the rustdoc and cargo teams to make it possible to use rmeta files to correctly combine data across crates. This has many moving parts and will take time to get right, but based on in-person conversations at RustWeek we all agreed was the best and most reliable path forward. > * Other improvements to `cargo-semver-checks` are ongoing: a full set of `#[target_feature]` lints ships in the next release, and two folks participating in Google Summer of Code have begun contributing to `cargo-semver-checks` already! > > > While the targets for the 2025H1 goals proved a bit too ambitious to hit in this timeline, I'm looking forward to continuing my work on the goal in the 2025H2 period! **Declarative ( `macro_rules!`) macro improvements** Current status: * @joshtriplett authored RFCs for both attribute macros and derive macros. * After some further iteration with the lang team, both RFCs were accepted and merged. * @joshtriplett, @eholk, and @vincenzopalazzo did some successful group-spelunking into the implementation of macros in rustc. * @joshtriplett rewrote the `macro_rules!` parser, which enabled future extensibility _and_ resulted in better error messages. This then enabled several follow-up refactors and simplifications. * @joshtriplett wrote a PR implementing attribute macros. 2 detailed updates available. Comment by @joshtriplett posted on 2025-07-21: > Current status: > > * @joshtriplett authored RFCs for both attribute macros and derive macros. Both were accepted and merged. > * @joshtriplett, @eholk, and @vincenzopalazzo did some successful group-spelunking into the implementation of macros in rustc. > * @joshtriplett rewrote the `macro_rules!` parser, which enabled future extensibility _and_ resulted in better error messages. This then enabled several follow-up refactors and simplifications. > * @joshtriplett wrote a PR implementing attribute macros (review in progress). > Comment by @joshtriplett posted on 2025-07-29: > Update: Implementation PR for attribute macros is up. **Evaluate approaches for seamless interop between C++ and Rust** **Recap** by @tmandry: This project goals cycle was important for C++ interop. With the language team we established that we should evolve Rust to enable a first-class C++ interop story, making rich and automatic bindings possible between the two languages. At the Rust All Hands, people from across the industry met to describe their needs to each other, what is working for them, and what isn't. This process of discovery has led to a lot of insight into where we can make progress now and ideas for what it will take to really "solve" interop. One thing I think we can say with certainty is that interop is a vast problem space, and that any two groups who want interop are very likely to have different specific needs. I'm excited about the project goal proposal by @baumanj to begin mapping this problem space out in the open, so that as we refer to problems we can better understand where our needs overlap and diverge. Despite the diversity of needs, we've noticed that there is quite a bit of overlap when it comes to language evolution. This includes many features requested by Rust for Linux, a flagship customer of the Rust Project. In retrospect, this is not surprising: Rust for Linux needs fine-grained interop with C APIs, which is roughly a subset of the needs for interop with C++ APIs. Often the need runs deeper than interop, and is more about supporting patterns in Rust that existing systems languages already support as a first-class feature. I'm looking forward to tackling areas where we can "extend the fundamentals" of Rust in a way that makes these, and other use cases, possible. This includes H2 project goal proposals like pin ergonomics, reborrowing, field projections, and in-place initialization. Thanks to everyone who contributed to the discussions this past cycle. Looking forward to seeing you in the next one! 2 detailed updates available. Comment by @tmandry posted on 2025-07-29: > Ahead of the all hands, @cramertj and @tmandry collaborated on a prototype called ecdysis that explored the viability of instantiating types "on-demand" in the Rust compiler. These types are intended to look like C++ template instantiations. The prototype was a success in that it made the direction look viable and also surfaced some foundational work that needs to happen in the compiler first. That said, continuing to pursue it is not the highest priority for either of us at the moment. > > Many thanks to @oli-obk for their advice and pointers. Comment by @tmandry posted on 2025-07-29: > **Recap** > > This project goals cycle was important for C++ interop. With the language team we established that we should evolve Rust to enable a first-class C++ interop story, making rich and automatic bindings possible between the two languages. At the Rust All Hands, people from across the industry met to describe their needs to each other, what is working for them, and what isn't. This process of discovery has led to a lot of insight into where we can make progress now and ideas for what it will take to really "solve" interop. > > One thing I think we can say with certainty is that interop is a vast problem space, and that any two groups who want interop are very likely to have different specific needs. I'm excited about the project goal proposal by @baumanj to begin mapping this problem space out in the open, so that as we refer to problems we can better understand where our needs overlap and diverge. > > Despite the diversity of needs, we've noticed that there is quite a bit of overlap when it comes to language evolution. This includes many features requested by Rust for Linux, a flagship customer of the Rust Project. In retrospect, this is not surprising: Rust for Linux needs fine-grained interop with C APIs, which is roughly a subset of the needs for interop with C++ APIs. Often the need runs deeper than interop, and is more about supporting patterns in Rust that existing systems languages already support as a first-class feature. > > I'm looking forward to tackling areas where we can "extend the fundamentals" of Rust in a way that makes these, and other use cases, possible. This includes H2 project goal proposals like pin ergonomics, reborrowing, field projections, and in-place initialization. > > Thanks to everyone who contributed to the discussions this past cycle. Looking forward to seeing you in the next one! **Experiment with ergonomic ref-counting** 1 detailed update available. Comment by @spastorino posted on 2025-06-30: > We're currently working on the last-use optimization. We've the liveness analysis needed implemented and we need to extensively test it. **Expose experimental LLVM features for GPU offloading** @ZuseZ4: The last update for this project-goal period! I have continued to work on the gpu support, while our two Rust/LLVM autodiff gsoc students made great progress with their corresponding projects. **Key developments:** 1. My memory-movement PR got reviewed and after a few iterations landed in nightly. That means you now don't even have to build your own rustc to move data to and from a GPU (with the limitations mentioned in my previous post). As part of my PR, I also updated the rustc-dev-guide: https://rustc-dev-guide.rust-lang.org/offload/installation.html. 2. Now that the host (CPU) code landed, I looked into compiling rust kernels to GPUs. When experimenting with the amdgcn target for rustc I noticed a regression, due to which all examples for that target failed. I submitted a small patch to fix it. It landed a few days ago, and prevents rustc from generating f128 types on AMD GPUs: https://github.com/rust-lang/rust/pull/144383. 3. I looked into HIP and OpenMP (managed/kernel-mode) examples to see what's needed to launch the kernels. I should already have most of the code upstream, since it landed as part of my host PR, so I think I should soon be able to add the remaining glue code to start running Rust code on GPUs. https://github.com/rust-lang/rust/pull/142696. 4. The main PR of @KMJ-007 is up, to start generating typetrees for Enzyme, the backend of our std::autodiff module. Enzyme sometimes wants more information about a type than it can get from LLVM, so it either needs to deduce it (slow), or it will fail to compile (bad). In the future we hope to lower MIR information to Enzyme, and this is the first step for it. I just submitted the first round of reviews: https://github.com/rust-lang/rust/pull/142640 5. The main PR of @Sa4dUs is up, it replaces my historically grown middle-end with a proper rustc-autodiff-intrinsic. This allows us to remove a few hacks and thus makes it easier to maintain. It will also handle more corner-cases, and reduces the amount of autodiff related code in rustc by ~400 lines. I also gave it a first review pass. I also submitted an updated project-goal to finish the `std::offload` module, to the point where we can write an interesting amount of kernels in pure (nightly) Rust and launch them to GPUs. All new project goals are supposed to have "champions" from the teams they are related to, which in the case of my autodiff/batching/offload work would be t-compiler and t-lang (see Niko's blog post for more details). Since I joined the compiler team a while ago I can now champion for it myself on the compiler side, and @traviscross volunteered to continue the support on the language side, thank you! 1 detailed update available. Comment by @ZuseZ4 posted on 2025-07-30: > The last update for this project-goal period! I have continued to work on the gpu support, while our two Rust/LLVM autodiff gsoc students made great progress with their corresponding projects. > > **Key developments:** > > 1. My memory-movement PR got reviewed and after a few iterations landed in nightly. That means you can now don't even have to build your own rustc to move data to and from a GPU (with the limitations mentioned in my previous post). As part of my PR, I also updated the rustc-dev-guide: https://rustc-dev-guide.rust-lang.org/offload/installation.html > > 2. Now that the host (CPU) code landed, I looked into compiling rust kernels to GPUs. When experimenting with the amdgcn target for rustc I noticed a regression, due to which all examples for that target failed. I submitted a small patch to fix it. It landed a few days ago, and prevents rustc from generating f128 types on AMD GPUs: https://github.com/rust-lang/rust/pull/144383 > > 3. I looked into HIP and OpenMP (managed/kernel-mode) examples to see what's needed to launch the kernels. I should already have most of the code upstream, since it landed as part of my host PR, so I think I should soon be able to add the remaining glue code to start running Rust code on GPUs. https://github.com/rust-lang/rust/pull/142696. > > 4. The main PR of @KMJ-007 is up, to start generating typetrees for Enzyme, the backend of our std::autodiff module. Enzyme sometimes wants more information about a type than it can get from LLVM, so it either needs to deduce it (slow), or it will fail to compile (bad). In the future we hope to lower MIR information to Enzyme, and this is the first step for it. I just submitted the first round of reviews: https://github.com/rust-lang/rust/pull/142640 > > 5. The main PR of @Sa4dUs is up, it replaces my historically grown middle-end with a proper rustc-autodiff-intrinsic. This allows us to remove a few hacks and thus makes it easier to maintain. It will also handle more corner-cases, and reduces the amount of autodiff related code in rustc by ~400 lines. I also gave it a first review pass. > > > > I also submitted an updated project-goal to finish the `std::offload` module, to the point where we can write an interesting amount of kernels in pure (nightly) Rust and launch them to GPUs. All new project goals are supposed to have "champions" from the teams they are related to, which in the case of my autodiff/batching/offload work would be t-compiler and t-lang (see Niko's blog post for more details). Since I joined the compiler team a while ago I can now champion for it myself on the compiler side, and @traviscross volunteered to continue the support on the language side, thank you! **Extend pubgrub to match cargo 's dependency resolution** 2 detailed updates available. @Eh2406: My time at Amazon is coming to an end. They supported the very successful effort with the 2024h2 goal, and encouraged me to propose the 2025h1 goal that is now wrapping up. Unfortunately other work efforts led to the very limited progress on the 2025h1 goal. I do not know what comes next, but it definitely involves taking time to relax and recover. Recovering involves rediscovering the joy in the work that I love. And, I have a deep passion for this problem. I hope to make some time to work on this. But, relaxing requires reducing the commitments I have made to others and the associated stress. So I will not promise progress, nor will I renew the goal for 2025h2. Comment by @Eh2406 posted on 2025-07-02: > My time at Amazon is coming to an end. They supported the very successful effort with the 2024h2 goal, and encouraged me to propose the 2025h1 goal that is now wrapping up. Unfortunately other work efforts led to the very limited progress on the 2025h1 goal. I do not know what comes next, but it definitely involves taking time to relax and recover. Recovering involves rediscovering the joy in the work that I love. And, I have a deep passion for this problem. I hope to make some time to work on this. But, relaxing requires reducing the commitments I have made to others and the associated stress. So I will not promise progress, nor will I renew the goal for 2025h2. Comment by @tomassedovic posted on 2025-07-25: > Thank you for everything Jacob and good luck! > > As the 2025 H1 period is coming to an end and we're focusing on the goals for the second half of the year, we will close this issue by the end of this month (July 2025). > > If you or someone else out there is working on this and has updates to share, please add them as a comment here by 2025-07-29 so they can be included in the final blog post. > > Even after the issue is closed, the work here _can_ be picked up -- we'll just no longer track it as part of the 2025H1 goals effort. **Externally Implementable Items** **Finish the libtest json output experiment** 2 detailed updates available. Comment by @epage posted on 2025-07-10: > Key developments: > > Blockers > > * Staffing wise, attention was taken by toml v0.9 and now cargo-script > > > Help wanted > > * Help in writing out the end-user API on top of the raw harness > Comment by @epage posted on 2025-07-28: > Key developments: > > * https://github.com/assert-rs/libtest2/pull/94 > * https://github.com/assert-rs/libtest2/pull/99 > * https://github.com/assert-rs/libtest2/pull/100 > **Implement Open API Namespace Support** 1 detailed update available. Comment by @b-naber posted on 2025-07-28: > Chiming in for @epage here since further progress is still blocked on the compiler implementation. Unfortunately things have been moving more slowly than I had initially hoped. We have been doing some refactoring (https://github.com/rust-lang/rust/pull/142547 and https://github.com/rust-lang/rust/pull/144131) that allow us to introduce a new `Scope` for namespaced crates inside name resolution. There's a draft PR (https://github.com/rust-lang/rust/pull/140271) that should be straightforward to adapt to the refactoring. **Implement restrictions, prepare for stabilization** 1 detailed update available. Comment by @jhpratt posted on 2025-08-05: > Implementation remains in progress; I'll be able to land a couple PRs soon getting it largely implemented. Progress was slower than expected due to me having a fair amount going on. As I still very much want this feature, I will continue work on it even with the goal having formally lapsed. > > Additionally, I think that after it's fully implemented it may be feasible to leverage the crate-local knowledge of `impl` restrictions to optimize `dyn` in an `enum_dispatch`-like manner. I haven't investigated the feasibility of that in the compiler — it's merely a suspicion. **Improve state machine codegen** **Instrument the Rust standard library with safety contracts** 2 detailed updates available. Comment by @celinval posted on 2025-07-03: > Unfortunately, we didn't make much progress since April except for a very useful discussion during Rust all hands. A few notes can be found here: https://hackmd.io/@qnR1-HVLRx-dekU5dvtvkw/SyUuR6SZgx. We're still waiting for the design discussion meeting with the compiler team. Comment by @celinval posted on 2025-07-25: > @dawidl022 is working as part of GSoC to improve contracts implementation under @tautschnig mentorship. Additionally, @tautschnig and @carolynzech are working on porting contracts from https://github.com/model-checking/verify-rust-std to the Rust repo. **Making compiletest more maintainable: reworking directive handling** **Metrics Initiative** 1 detailed update available. Comment by @yaahc posted on 2025-07-11: > No update for this month beyond the previous finalish update. I still intend to publish the json->influxdb conversion code **Model coherence in a-mir-formality** **Next-generation trait solver** 2 detailed updates available. Comment by @lcnr posted on 2025-07-14: > We - or well, overwhelmingly @compiler-errors - continued to make performance improvements to the new solver over the last month: https://github.com/rust-lang/rust/pull/142802 https://github.com/rust-lang/rust/pull/142732 https://github.com/rust-lang/rust/pull/142317 https://github.com/rust-lang/rust/pull/142316 https://github.com/rust-lang/rust/pull/142223 https://github.com/rust-lang/rust/pull/142090 https://github.com/rust-lang/rust/pull/142088 https://github.com/rust-lang/rust/pull/142085 https://github.com/rust-lang/rust/pull/141927 https://github.com/rust-lang/rust/pull/141581 https://github.com/rust-lang/rust/pull/141451. `nalgebra` is currently 70% slower than with the old solver implementation and we seem to be about 30-50% slower in most _normal_ crates. > > I've been working on strengthening the search graph to avoid the hang in rayon and https://github.com/rust-lang/trait-system-refactor-initiative/issues/210 in a principled way. This has been more challenging than expected and will take at least another week to get done. Comment by @lcnr posted on 2025-07-29: > Since the last update @compiler-errors landed two additional perf optimizations: https://github.com/rust-lang/rust/pull/143500 https://github.com/rust-lang/rust/pull/143309. > > I am still working on the hang in rayon and https://github.com/rust-lang/trait-system-refactor-initiative/issues/210. I've ended up having to change the invariants of the type system to support a fast paths based on structural identity, e.g. quickly proving `T: Trait<'a>` via a `T: Trait<'a>` where-bound, in https://github.com/rust-lang/rust/pull/144405. Changing this invariant requires some additional work in HIR typeck, so I am currently reducing the perf impact of that change. > > With this I can then land the actual fast paths which fix both rayon and similar hangs due to a large number of where-bounds. This should also be done soon. I will then go back to implement the new opaque type handling approach as that's the only remaining issue before we can call for testing. **Nightly support for ergonomic SIMD multiversioning** 1 detailed update available. Comment by @veluca93 posted on 2025-07-10: > Key developments: https://github.com/rust-lang/rust/issues/143352 proposes an experimental feature to investigate an effect-based approach to integrate generics and target features, effectively giving ways to have different monomorphizations of a function have different target features. **Null and enum-discriminant runtime checks in debug builds** 1 detailed update available. Comment by @1c3t3a posted on 2025-07-25: > **Key developments** : Landed the enum discriminant check and enabled it for transmutes to enums for now (this is not so powerful), currently extending it to union reads and pointer reads. > > **Blockers:** question of how to insert a check if we already observe UB (e.g. the enum is only represented by an i1 in LLVM IR). This is to be addressed by the next project goal: https://rust-lang.github.io/rust-project-goals/2025h2/comprehensive-niche-checks.html. **Optimizing Clippy & linting** @blyxyas: **Final monthly update!** * Even more optimizations have been achieved on the documentation lints front. https://github.com/rust-lang/rust-clippy/pull/15030 (-6.7% on `bumpalo`). * The 3rd heaviest function was optimized away by 99.75%, along with the `strlen_on_c_strings` lint. This gives us about a 15% optimization on `tokio`. https://github.com/rust-lang/rust-clippy/pull/15043. * As a minor improvement, we now instantiate a lot less types on `unit_return_expecting_ord` (89% less calls in some benchmarks). This saves us a lot of locks on the type interner. As a final update to the project goal, I'd like to say a little bit more: I'm very happy with how this project goal has turned out. We've seen improvements in the 35-60% range for your real world projects and while I couldn't deliver the two objectives the project goal promised because of an excess in ambition, I still don't think that these are too far-fetched by any means. As some specific examples, you can now witness a **38%** performance improvements in analyzing Cargo, and a **61%** in analyzing Tokio! Much more to come, and thanks for sticking by while we make Clippy a better project, with better developer experience. Have a great week, and I hope that you can enjoy all the performance improvements that we've delivered across this project goal. 1 detailed update available. Comment by @blyxyas posted on 2025-06-27: > **Final monthly update!** > > * Even more optimizations have been achieved on the documentation lints front. https://github.com/rust-lang/rust-clippy/pull/15030. (-6.7% on `bumpalo`). > > * The 3rd heaviest function was optimized away by 99.75%, along with the `strlen_on_c_strings` lint. This gives us about a 15% optimization on `tokio`. https://github.com/rust-lang/rust-clippy/pull/15043 > > * As a minor improvement, we now instantiate a lot less types on `unit_return_expecting_ord` (89% less calls in some benchmarks). This saves us a lot of locks on the type interner. > > > > As a final update to the project goal, I'd like to say a little bit more: > > I'm very happy with how this project goal has turned out. We've seen improvements in the 35-60% range for your real world projects and while I couldn't deliver the two objectives the project goal promised because of an excess in ambition, I still don't think that these are too far-fetched by any means. > > As some specific examples, you can now witness a **38%** performance improvements in analyzing Cargo, and a **61%** in analyzing Tokio! > > Much more to come, and thanks for sticking by while we make Clippy a better project, with better developer experience. Have a great week, and I hope that you can enjoy all the performance improvements that we've delivered across this project goal. **Prepare const traits for stabilization** @oli-obk: The following contributors have made many libcore traits `const`: * @Daniel-Aaron-Bloom * @estebank * @Randl * @SciMind2460 @fee1-dead has also updated the syntax to allow for `const trait Trait {}` declarations instead of `#[const_trait] trait Trait {}`. Thanks y'all for moving this feature along! We have encountered few issues, but there is one major one: without `dyn [const] Trait` support we cannot turn any of the `core::fmt` traits const in a usable way. This in turn makes things like `Result::unwrap` not usable in const contexts without using `const_eval_select` to not actually perform any formatting within const contexts. It is my belief that now would be a good time to call for testing to get community input on the current syntax and behaviour. 2 detailed updates available. Comment by @oli-obk posted on 2025-07-10: > The current proposal is `[const] Trait` syntax for bounds, `impl const Trait for Type` syntax for impls and `const Trait` for trait declarations. No annotations on methods in traits or impls required, but all implied from the trait or impl. > > Re-constification of libstd has commenced Comment by @oli-obk posted on 2025-07-28: > The following contributors have made many libcore traits `const`: > > * @Daniel-Aaron-Bloom > * @estebank > * @Randl > * @SciMind2460 > > > @fee1-dead has also updated the syntax to allow for `const trait Trait {}` declarations instead of `#[const_trait] trait Trait {}`. > > Thanks y'all for moving this feature along! > > We have encountered few issues, but there is one major one: > > without `dyn [const] Trait` support we cannot turn any of the `core::fmt` traits const in a usable way. This in turn makes things like `Result::unwrap` not usable in const contexts without using `const_eval_select` to not actually perform any formatting within const contexts. > > It is my belief that now would be a good time to call for testing to get community input on the current syntax and behaviour. **Prototype a new set of Cargo "plumbing" commands** 2 detailed updates available. Comment by @epage posted on 2025-07-10: > * Key developments: > * GSoC work has started on https://github.com/crate-ci/cargo-plumbing > * `cargo locate-manifest` is merged > * `cargo read-manifest` is merged > * Investigation is on-going for dependency resolution > * Blockers > * Help wanted > Comment by @epage posted on 2025-07-28: > Key developments: > > * https://github.com/crate-ci/cargo-plumbing/pull/50 has been posted > **Publish first rust-lang-owned release of "FLS"** Key Developments: **Goal Complete.** The FLS is now an independent repository within the Rust Project, not relying on imported Ferrocene packages for building (we have brought them in locally). A version of the FLS has been published at https://rust-lang.github.io/fls using the new build process. The content changes were mostly non-normative at this point, but we have officially published the first rust-lang owned release of the FLS. Next steps: Continue adding/modifying appropriate content for the FLS moving forward. Determine any potential H2 2025 spec-related project goals. 1 detailed update available. Comment by @JoelMarcey posted on 2025-06-30: > Key Developments: **Goal Complete.** > > The FLS is now an independent repository within the Rust Project, not relying on imported Ferrocene packages for building (we have brought them in locally). A version of the FLS has been published at https://rust-lang.github.io/fls using the new build process. The content changes were mostly non-normative at this point, but we have officially published the first rust-lang owned release of the FLS. > > Next steps: Continue adding/modifying appropriate content for the FLS moving forward. Determine any potential H2 2025 spec-related project goals. **Publish first version of StableMIR on crates.io** We're almost done with the refactoring thanks again to @makai410 who is part of the GSoC. The `stable_mir` crate is now `rustc_public`. We are now finalizing the infrastructure and working on a compiler MCP. We should be ready to publish version 0.1 in the second half of the year. Thanks to everyone who helped, especially @makai410, who did most of the work. 2 detailed updates available. Comment by @celinval posted on 2025-07-03: > We're almost done with the refactoring thanks again to @makai410 who is part of the GSoC. We are now considering renaming the crate before publishing, if you have any suggestion, please post it in https://rust-lang.zulipchat.com/#narrow/channel/320896-project-stable-mir/topic/Renaming.20StableMIR/with/520505712. > > Finally, we're designing the test and release automation. Comment by @celinval posted on 2025-07-25: > The `stable_mir` crate is now `rustc_public`. We are now finalizing the infrastructure and working on a compiler MCP. We should be ready to publish version 0.1 in the second half of the year. Thanks to everyone who helped, especially @makai410, who did most of the work. **Research: How to achieve safety when linking separately compiled code** **Run the 2025H1 project goal program** **Rust Vision Document** **rustc-perf improvements** We made further progress on the new benchmarking scheme. The side of the website is nearing MVP status, currently we are switching focus on the side of the collector tha truns the benchmarks. Some notable PRs: * Benchmark request queue for try builds and release artifacts (https://github.com/rust-lang/rustc-perf/pull/2166, https://github.com/rust-lang/rustc-perf/pull/2192, https://github.com/rust-lang/rustc-perf/pull/2197, https://github.com/rust-lang/rustc-perf/pull/2201). * Splitting of benchmark requests into benchmark jobs, including backfilling (https://github.com/rust-lang/rustc-perf/pull/2207). * Benchmark sets (https://github.com/rust-lang/rustc-perf/pull/2206). 1 detailed update available. Comment by @Kobzol posted on 2025-07-29: > We made further progress on the new benchmarking scheme. The side of the website is nearing MVP status, currently we are switching focus on the side of the collector tha truns the benchmarks. > > Some notable PRs: > > * Benchmark request queue for try builds and release artifacts (https://github.com/rust-lang/rustc-perf/pull/2166, https://github.com/rust-lang/rustc-perf/pull/2192, https://github.com/rust-lang/rustc-perf/pull/2197, https://github.com/rust-lang/rustc-perf/pull/2201). > * Splitting of benchmark requests into benchmark jobs, including backfilling (https://github.com/rust-lang/rustc-perf/pull/2207). > * Benchmark sets (https://github.com/rust-lang/rustc-perf/pull/2206). > **Scalable Polonius support on nightly** @lqd: Here are the key developments for the month of June, the last of this H1 project goal period. Amanda has been preparing a **couple of papers** on polonius 🔥! As for me, I've continued on the previous threads of work: * the drop-liveness dataflow optimization landed, and I've also changed the bitset used in the loans-in-scope computation to better support the sparser cases with a lot of loans that we see in a handful of benchmarks (and we could tune that cutoff if we wanted to, it's currently around 2K by default in the `MixedBitSet` implementation IIRC). * the rustc-perf benchmarks we have mostly exercise the move/init dataflow parts of borrow-checking, so I've created a stress test that puts emphasis on the loans-in-scope computation in particular, and have started gathering stats on crates.io code to have realistic examples. There are juicy functions in there, where one of the dataflow passes can take 40 seconds. * I reworked the in-tree analysis to what should be close to a "polonius alpha" version of the analysis -- modulo a few loose ends that still need to be fixed -- and did some perf runs and a few crater runs with it enabled by default: nothing exploded. We know that this version based on reachability fixes fewer issues than a full version handling 100% of the flow-sensitivity problem -- like the datalog implementation did, albeit too slowly -- but is _actionable_ and meaningful progress: it fixes many cases of NLL problem 3. We're also reasonably confident that we can make a production-ready version of this alpha algorithm, and in this project goal period we have identified the areas where improvements can be made to gradually improve expressiveness, and that we wish to explore later. * I also discovered a couple of failing examples with the new edition edition 2024 capture rules, and generally need to take care of member constraints, so it's not unexpected. Another small signal to improve test coverage, but not specific to borrowck: it's for all tests and editions in general, as seen in MCP #861. * I've opened PR #143093 to land this polonius alpha analysis, and after looking into fixing member constraints, it should be the behavioral basis of what we hope to stabilize in the future, once it's more suited to production (e.g. better perf, better test coverage, more edge cases analyses, formalism) be it by incremental improvements, or via a different rewritten version of this algorithm -- with modifications to NLLs to make the interactions lazier/on-demand, so that we don't run a more expensive analysis if we don't need to. In the future, hopefully for a h2 project goal, I plan to do that work towards stabilizing this alpha version of the analysis. 1 detailed update available. Comment by @lqd posted on 2025-06-30: > Here are the key developments for the month of June, the last of this H1 project goal period. > > Amanda has been preparing a **couple of papers** on polonius 🔥! > > As for me, I've continued on the previous threads of work: > > * the drop-liveness dataflow optimization landed, and I've also changed the bitset used in the loans-in-scope computation to better support the sparser cases with a lot of loans that we see in a handful of benchmarks (and we could tune that cutoff if we wanted to, it's currently around 2K by default in the `MixedBitSet` implementation IIRC). > * the rustc-perf benchmarks we have mostly exercise the move/init dataflow parts of borrow-checking, so I've created a stress test that puts emphasis on the loans-in-scope computation in particular, and have started gathering stats on crates.io code to have realistic examples. There are juicy functions in there, where one of the dataflow passes can take 40 seconds. > * I reworked the in-tree analysis to what should be close to a "polonius alpha" version of the analysis -- modulo a few loose ends that still need to be fixed -- and did some perf runs and a few crater runs with it enabled by default: nothing exploded. We know that this version based on reachability fixes fewer issues than a full version handling 100% of the flow-sensitivity problem -- like the datalog implementation did, albeit too slowly -- but is _actionable_ and meaningful progress: it fixes many cases of NLL problem 3. We're also reasonably confident that we can make a production-ready version of this alpha algorithm, and in this project goal period we have identified the areas where improvements can be made to gradually improve expressiveness, and that we wish to explore later. > * I also discovered a couple of failing examples with the new edition edition 2024 capture rules, and generally need to take care of member constraints, so it's not unexpected. Another small signal to improve test coverage, but not specific to borrowck: it's for all tests and editions in general, as seen in MCP #861. > * I've opened PR #143093 to land this polonius alpha analysis, and after looking into fixing member constraints, it should be the behavioral basis of what we hope to stabilize in the future, once it's more suited to production (e.g. better perf, better test coverage, more edge cases analyses, formalism) be it by incremental improvements, or via a different rewritten version of this algorithm -- with modifications to NLLs to make the interactions lazier/on-demand, so that we don't run a more expensive analysis if we don't need to. > > > In the future, hopefully for a h2 project goal, I plan to do that work towards stabilizing this alpha version of the analysis. **Secure quorum-based cryptographic verification and mirroring for crates.io** @walterhpearce: Hello All - Following is a status update and breakdown on where things currently stand for the MVP implementation of TUF and the choices we’ve landed at so far with the discussion via this goal. At the end of this update is a briefer list-form of this update. In summary, we have landed at moving forward with a TAP-16 Merkle Tree implementation of TUF for crates.io, with technical choices pending on the best balance and optimization for our specific performance needs. We are still currently on track to have a MVP public implementation by the end of July of this implementation, which optimizations will be tested against. This includes: * Test repositories and tooling for rustup, releases and crates.io * Temporary repository tooling for updates (We are currently outside these services, and so updates occur via periodic checks) * An out-of-band index copy for crates.io for in-line signing testing * cargo-signing subcommand tooling for end-user functionality (TUF updates, validation and downloading) We still have open questions for the specific approach of the Merkle tree, which is continuing into H2. We have also reached an acceptable consensus with the infrastructure team for deployment planning. TUF Implementation During H1, we experimented with 4 implementations of TUF: To-spec, Hashed Bins, Succinct Hashed Bins, and TUF TAP-16 Merkle Trees. Hashed Bins & Succinct Hashed Bins are the current approaches being experimented with in the Python community, and we wanted to see how that would align with our growth and bandwidth requirements. After experimenting, we found the linear growth models to still be unacceptable, thus landing at the Merkle Tree implementation. This still comes at a round-trip increase cost, however, and for H2 we are now experimenting with how to implement the Merkle tree to reduce round-trips - via balancing, implementation details and tree slicing - or a combination of the three.. Quorum & Roles On the higher level grounds of quorums and infrastructure, through discussions, we have come to a consensus on maintaining a top-level quorum, but removing intermediate levels for simplicity. The root quorum shall be the Infrastructure team for initial deployment; roles under this quorum will be nightly, releases, rustup and crates.io; each one of these keys will be a single live key which resides in KMS. We will leverage KMS API’s to perform live signing for all actions of those roles (new releases and crates). The hierarchy initially proposed in the RFC will be removed in favor of this approach. The root quorum will manage the roles via tuf-on-ci on a github repository, while actual signing actions using the live keys will all occur via local tooling in their CI. Choices Made Listed here the choices made as a part of this goal: * Initial root quorum will be the infrastructure team with a 3-member threshold. This can be rotated or grown at any time by that team in the future. * Role keys will live in KMS and be used in the appropriate CI/infrastructure of those teams (Infra for nightly, releases and rustup; the crates.io team for crates). This will be managed via IAM access to the KMS. * TAP-16 Merkle Tree implementation of TUF was chosen. Other methods linear+ growth models were unacceptable. We still have open questions to resolve around bandwidth vs. round-trips * tuf-on-ci will only be used for the root quorum and role changes, to leverage PR-workflows for easy management. * The source-of-truth TUF repository will live in an S3 bucket. * We will rely on cloudtrail for audit logging of KMS and work to make those logs available for transparency Next Steps * A public MVP will go live at the end of July / August, and live changes/tests will be made of the Merkle tree implementation there. * We still need to determine the appropriate trade off for round trips vs. bandwidth for the Merkle Tree. We are collecting more granular logs from the sparse index and crates.io index as a whole to accomplish this. Crate downloads vs. updates are very unbalanced, and we expect to get significant reductions of both by appropriately balancing the tree. * Work needs to start on beginning to stand up infrastructure in the project to house this in the simpleinfra repository. Besides the raw infrastructure, this needs to be tooling for the initial creation ceremony. * We’ve begun thinking about what different mirroring strategies look like when utilizing TUF, to make sure we consider those when deploying this. The MVP provides basic validation of any mirror, but how can mirroring and fallbacks possibly be integrated? 1 detailed update available. Comment by @walterhpearce posted on 2025-07-29: > Hello All - > > Following is a status update and breakdown on where things currently stand for the MVP implementation of TUF and the choices we’ve landed at so far with the discussion via this goal. At the end of this update is a briefer list-form of this update. > > In summary, we have landed at moving forward with a TAP-16 Merkle Tree implementation of TUF for crates.io, with technical choices pending on the best balance and optimization for our specific performance needs. We are still currently on track to have a MVP public implementation by the end of July of this implementation, which optimizations will be tested against. This includes: > > * Test repositories and tooling for rustup, releases and crates.io > * Temporary repository tooling for updates (We are currently outside these services, and so updates occur via periodic checks) > * An out-of-band index copy for crates.io for in-line signing testing > * cargo-signing subcommand tooling for end-user functionality (TUF updates, validation and downloading) > > > We still have open questions for the specific approach of the Merkle tree, which is continuing into H2. We have also reached an acceptable consensus with the infrastructure team for deployment planning. > > TUF Implementation > > During H1, we experimented with 4 implementations of TUF: To-spec, Hashed Bins, Succinct Hashed Bins, and TUF TAP-16 Merkle Trees. Hashed Bins & Succinct Hashed Bins are the current approaches being experimented with in the Python community, and we wanted to see how that would align with our growth and bandwidth requirements. After experimenting, we found the linear growth models to still be unacceptable, thus landing at the Merkle Tree implementation. This still comes at a round-trip increase cost, however, and for H2 we are now experimenting with how to implement the Merkle tree to reduce round-trips - via balancing, implementation details and tree slicing - or a combination of the three.. > > Quorum & Roles > > On the higher level grounds of quorums and infrastructure, through discussions, we have come to a consensus on maintaining a top-level quorum, but removing intermediate levels for simplicity. The root quorum shall be the Infrastructure team for initial deployment; roles under this quorum will be nightly, releases, rustup and crates.io; each one of these keys will be a single live key which resides in KMS. We will leverage KMS API’s to perform live signing for all actions of those roles (new releases and crates). The hierarchy initially proposed in the RFC will be removed in favor of this approach. > > The root quorum will manage the roles via tuf-on-ci on a github repository, while actual signing actions using the live keys will all occur via local tooling in their CI. > > Choices Made > > Listed here the choices made as a part of this goal: > > * Initial root quorum will be the infrastructure team with a 3-member threshold. This can be rotated or grown at any time by that team in the future. > * Role keys will live in KMS and be used in the appropriate CI/infrastructure of those teams (Infra for nightly, releases and rustup; the crates.io team for crates). This will be managed via IAM access to the KMS. > * TAP-16 Merkle Tree implementation of TUF was chosen. Other methods linear+ growth models were unacceptable. We still have open questions to resolve around bandwidth vs. round-trips > * tuf-on-ci will only be used for the root quorum and role changes, to leverage PR-workflows for easy management. > * The source-of-truth TUF repository will live in an S3 bucket. > * We will rely on cloudtrail for audit logging of KMS and work to make those logs available for transparency > > > Next Steps > > * A public MVP will go live at the end of July / August, and live changes/tests will be made of the Merkle tree implementation there. > * We still need to determine the appropriate trade off for round trips vs. bandwidth for the Merkle Tree. We are collecting more granular logs from the sparse index and crates.io index as a whole to accomplish this. Crate downloads vs. updates are very unbalanced, and we expect to get significant reductions of both by appropriately balancing the tree. > * Work needs to start on beginning to stand up infrastructure in the project to house this in the simpleinfra repository. Besides the raw infrastructure, this needs to be tooling for the initial creation ceremony. > * We’ve begun thinking about what different mirroring strategies look like when utilizing TUF, to make sure we consider those when deploying this. The MVP provides basic validation of any mirror, but how can mirroring and fallbacks possibly be integrated? > **SVE and SME on AArch64** @davidtwco: * rust-lang/rust#137944 got merged with Part I of the Sized Hierarchy work * A bug was discovered through fuzzing when the feature was enabled, users could write `dyn PointeeSized` which would trigger the builtin impl for `PointeeSized`, which doesn't exist. rust-lang/rust#143104 was merged to fix that. * In attempt to experiment with relaxing `Deref::Target`, we discovered that sizedness supertraits weren't being elaborated from where bounds on projections. * Adding those bounds meant that there could be two candidates for some obligations - from a where bound and from an item bound - where previously there would only be the item bound. Where bounds take priority and this could result in regions being equated that did not previously. * By fixing that, we ran into issues with normalisation that was happening which restricted what code using GATs was accepted. Fixing this got everything passing but more code is accepted. * rust-lang/rust#142712 has this fixed, but isn't yet merged as it's quite involved. * I've still not made any changes to the Sized Hierarchy RFC, there's a small amount of discussion which will be responded to once the implementation has landed. * While implementing Part II of the Sized Hierarchy work, we ran into limitations of the old solver w/r/t host effect predicates around coinductive cycles. We've put that aside until there's nothing else to do or the new solver is ready. * We've been reviving the RFC and implementation of the SVE infrastructure, relying on some exceptions because of not having const sizedness yet, but knowing that we've got a solution for that coming, we're hoping to see this merged as an experiment once it is ready. * We've opened rust-lang/rust#144404 that documents the current status of the Sized Hierarchy feature and our plans for it. * As before, implementing const sizedness is on hold until the next solver is ready or there's nothing else to do. * We've opened rust-lang/rust#144064 with the interesting parts of rust-lang/rust#142712 from a t-types perspective, that's currently waiting on FCP checkboxes. * This will enable experimentation with relaxing `Deref::Target` to `PointeeSized`. * We've opened rust-lang/rfcs#3838 and rust-lang/rust#143924 updating rust-lang/rfcs#3268 and rust-lang/rust#118917 respectively. * There's been lots of useful feedback on this that we're working on addressing and will have an update soon 2 detailed updates available. Comment by @davidtwco posted on 2025-07-11: > * rust-lang/rust#137944 got merged with Part I of the Sized Hierarchy work > * A bug was discovered through fuzzing when the feature was enabled, users could write `dyn PointeeSized` which would trigger the builtin impl for `PointeeSized`, which doesn't exist. rust-lang/rust#143104 was merged to fix that. > * In attempt to experiment with relaxing `Deref::Target`, we discovered that sizedness supertraits weren't being elaborated from where bounds on projections. > * Adding those bounds meant that there could be two candidates for some obligations - from a where bound and from an item bound - where previously there would only be the item bound. Where bounds take priority and this could result in regions being equated that did not previously. > * By fixing that, we ran into issues with normalisation that was happening which restricted what code using GATs was accepted. Fixing this got everything passing but more code is accepted. > * rust-lang/rust#142712 has this fixed, but isn't yet merged as it's quite involved. > * I've still not made any changes to the Sized Hierarchy RFC, there's a small amount of discussion which will be responded to once the implementation has landed. > * While implementing Part II of the Sized Hierarchy work, we ran into limitations of the old solver w/r/t host effect predicates around coinductive cycles. We've put that aside until there's nothing else to do or the new solver is ready. > * We've been reviving the RFC and implementation of the SVE infrastructure, relying on some exceptions because of not having const sizedness yet, but knowing that we've got a solution for that coming, we're hoping to see this merged as an experiment once it is ready. > Comment by @davidtwco posted on 2025-07-29: > * We've opened rust-lang/rust#144404 that documents the current status of the Sized Hierarchy feature and our plans for it. > * As before, implementing const sizedness is on hold until the next solver is ready or there's nothing else to do. > * We've opened rust-lang/rust#144064 with the interesting parts of rust-lang/rust#142712 from a t-types perspective, that's currently waiting on FCP checkboxes. > * This will enable experimentation with relaxing `Deref::Target` to `PointeeSized`. > * We've opened rust-lang/rfcs#3838 and rust-lang/rust#143924 updating rust-lang/rfcs#3268 and rust-lang/rust#118917 respectively. > * There's been lots of useful feedback on this that we're working on addressing and will have an update soon > **Unsafe Fields** **Use annotate-snippets for rustc diagnostic output** 1 detailed update available. Comment by @Muscraft posted on 2025-07-10: > Key developments > > * The new API for `annotate-snippets` got merged (and tweaked) > * `annotate-snippets` passed all of `rustc`'s UI tests for the first time > * I started getting `annotate-snippets` ready for release > * I started opening PRs to get `rustc` to match `annotate-snippets` planned output changes > > > Blockers > > Help wanted
blog.rust-lang.org
August 14, 2025 at 11:45 PM
crates.io: development update
Since our last development update in February 2025, we have continued to make significant improvements to crates.io. In this blog post, we want to give you an update on the latest changes that we have made to crates.io over the past few months. ## Trusted Publishing We are excited to announce that we have implemented "Trusted Publishing" support on crates.io, as described in RFC #3691. This feature was inspired by the PyPI team's excellent work in this area, and we want to thank them for the inspiration! Trusted Publishing eliminates the need for GitHub Actions secrets when publishing crates from your CI/CD pipeline. Instead of managing API tokens, you can now configure which GitHub repository you trust directly on crates.io. That repository is then allowed to request a short-lived API token for publishing in a secure way using OpenID Connect (OIDC). While Trusted Publishing is currently limited to GitHub Actions, we have built it in a way that allows other CI/CD providers like GitLab CI to be supported in the future. To get started with Trusted Publishing, you'll need to publish your first release manually. After that, you can set up trusted publishing for future releases. The detailed documentation is available at https://crates.io/docs/trusted-publishing. Here's an example of how to set up GitHub Actions to use Trusted Publishing: name: Publish to crates.io on: push: tags: ['v*'] # Triggers when pushing tags starting with 'v' jobs: publish: runs-on: ubuntu-latest environment: release # Optional: for enhanced security permissions: id-token: write # Required for OIDC token exchange steps: - uses: actions/checkout@v4 - uses: rust-lang/crates-io-auth-action@v1 id: auth - run: cargo publish env: CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} ## OpenGraph Images Previously, crates.io used a single OpenGraph image for all pages. We have now implemented dynamic OpenGraph image generation, where each crate has a dedicated image that is regenerated when new versions are published. These images include the crate name, keywords, description, latest version (or rather the default version that we show for the crate), number of releases, license, and crate size. This provides much more useful information when crates.io links are shared on social media platforms or in chat applications. The image generation has been extracted to a dedicated crate: crates_io_og_image (GitHub). We're also adding basic theming support in PR #3 to allow docs.rs to reuse the code for their own OpenGraph images. Under the hood, the image generation uses two other excellent Rust projects: Typst for layout and text rendering, and oxipng for PNG optimization. ## docs.rs rebuilds Crate owners can now trigger documentation rebuilds for docs.rs directly from the crate's version list on crates.io. This can be useful when docs.rs builds have failed or when you want to take advantage of new docs.rs features without having to publish a new release just for that. We would like to thank our crates.io team member @eth3lbert for implementing the initial version of this feature in PR #11422. ## README alert support We've added support for rendering GitHub-style alerts in README files. This feature allows crate authors to use alert blocks like `> [!NOTE]`, `> [!WARNING]`, and `> [!CAUTION]` in their README markdown, which will now be properly styled and displayed on crates.io. This enhancement was also implemented by @eth3lbert in PR #11441, building on initial work by @kbdharun. ## Miscellaneous These were some of the more visible changes to crates.io over the past couple of months, but a lot has happened "under the hood" as well. Here are a couple of examples: ### Email system refactoring Previously, we used the `format!()` macro and string concatenation to create emails, which made them hard to maintain and inconsistent in styling. We have migrated to the minijinja crate and now use templates instead. The new system includes a template inheritance system for consistent branding across all emails. This change also enables us to support HTML emails in the future. ### SemVer sorting optimization Previously, we had to load all versions from the database and sort them by SemVer on the API server, which was inefficient for crates with many versions. Our PostgreSQL provider did not support the semver extension, so we had to implement sorting in application code. PR #10763 takes advantage of JSONB support in PostgreSQL and their btree ordering specification to implement SemVer sorting on the database side. This reduces the load on our API servers and improves response times for crates with many versions. ## Feedback We hope you enjoyed this update on the development of crates.io. If you have any feedback or questions, please let us know on Zulip or GitHub. We are always happy to hear from you and are looking forward to your feedback!
blog.rust-lang.org
July 21, 2025 at 11:36 PM
Stabilizing naked functions
Rust 1.88.0 stabilizes the `#[unsafe(naked)]` attribute and the `naked_asm!` macro which are used to define naked functions. A naked function is marked with the `#[unsafe(naked)]` attribute, and its body consists of a single `naked_asm!` call. For example: /// SAFETY: Respects the 64-bit System-V ABI. #[unsafe(naked)] pub extern "sysv64" fn wrapping_add(a: u64, b: u64) -> u64 { // Equivalent to `a.wrapping_add(b)`. core::arch::naked_asm!( "lea rax, [rdi + rsi]", "ret" ); } What makes naked functions special — and gives them their name — is that the handwritten assembly block defines the _entire_ function body. Unlike non-naked functions, the compiler does not add any special handling for arguments or return values. This feature is a more ergonomic alternative to defining functions using `global_asm!`. Naked functions are used in low-level settings like Rust's `compiler-builtins`, operating systems, and embedded applications. ## Why use naked functions? But wait, if naked functions are just syntactic sugar for `global_asm!`, why add them in the first place? To see the benefits, let's rewrite the `wrapping_add` example from the introduction using `global_asm!`: // SAFETY: `wrapping_add` is defined in this module, // and expects the 64-bit System-V ABI. unsafe extern "sysv64" { safe fn wrapping_add(a: u64, b: u64) -> u64 } core::arch::global_asm!( r#" // Platform-specific directives that set up a function. .section .text.wrapping_add,"ax",@progbits .p2align 2 .globl wrapping_add .type wrapping_add,@function wrapping_add: lea rax, [rdi + rsi] ret .Ltmp0: .size wrapping_add, .Ltmp0-wrapping_add "# ); The assembly block starts and ends with the directives (`.section`, `.p2align`, etc.) that are required to define a function. These directives are mechanical, but they are different between object file formats. A naked function will automatically emit the right directives. Next, the `wrapping_add` name is hardcoded, and will not participate in Rust's name mangling. That makes it harder to write cross-platform code, because different targets have different name mangling schemes (e.g. x86_64 macOS prefixes symbols with `_`, but Linux does not). The unmangled symbol is also globally visible — so that the `extern` block can find it — which can cause symbol resolution conflicts. A naked function's name does participate in name mangling and won't run into these issues. A further limitation that this example does not show is that functions defined using global assembly cannot use generics. Especially const generics are useful in combination with assembly. Finally, having just one definition provides a consistent place for (safety) documentation and attributes, with less risk of them getting out of date. Proper safety comments are essential for naked functions. The `naked` attribute is unsafe because the ABI (`sysv64` in our example), the signature, and the implementation have to be consistent. ## How did we get here? Naked functions have been in the works for a long time. The original RFC for naked functions is from 2015. That RFC was superseded by RFC 2972 in 2020. Inline assembly in Rust had changed substantially at that point, and the new RFC limited the body of naked functions to a single `asm!` call with some additional constraints. And now, 10 years after the initial proposal, naked functions are stable. Two additional notable changes helped prepare naked functions for stabilization: ##### Introduction of the `naked_asm!` macro The body of a naked function must be a single `naked_asm!` call. This macro is a blend between `asm!` (it is in a function body) and `global_asm!` (only some operand types are accepted). The initial implementation of RFC 2972 added lints onto a standard `asm!` call in a naked function. This approach made it hard to write clear error messages and documentation. With the dedicated `naked_asm!` macro the behavior is much easier to specify. ##### Lowering to `global_asm!` The initial implementation relied on LLVM to lower functions with the `naked` attribute for code generation. This approach had two issues: * LLVM would sometimes add unexpected additional instructions to what the user wrote. * Rust has non-LLVM code generation backends now, and they would have had to implement LLVM's (unspecified!) behavior. The implementation that is stabilized now instead converts the naked function into a piece of global assembly. The code generation backends can already emit global assembly, and this strategy guarantees that the whole body of the function is just the instructions that the user wrote. ## What's next for assembly? We're working on further assembly ergonomics improvements. If naked functions are something you are excited about and (may) use, we'd appreciate you testing these new features and providing feedback on their designs. ##### `extern "custom"` functions Naked functions usually get the `extern "C"` calling convention. But often that calling convention is a lie. In many cases, naked functions don't implement an ABI that Rust knows about. Instead they use some custom calling convention that is specific to that function. The `abi_custom` feature adds `extern "custom"` functions and blocks, which allows us to correctly write code like this example from compiler-builtins: #![feature(abi_custom)] /// Division and modulo of two numbers using Arm's nonstandard ABI. /// /// ```c /// typedef struct { int quot; int rem; } idiv_return; /// __value_in_regs idiv_return __aeabi_idivmod(int num, int denom); /// ``` // SAFETY: The assembly implements the expected ABI, and "custom" // ensures this function cannot be called directly. #[unsafe(naked)] pub unsafe extern "custom" fn __aeabi_idivmod() { core::arch::naked_asm!( "push {{r0, r1, r4, lr}}", // Back up clobbers. "bl {trampoline}", // Call an `extern "C"` function for a / b. "pop {{r1, r2}}", "muls r2, r2, r0", // Perform the modulo. "subs r1, r1, r2", "pop {{r4, pc}}", // Restore clobbers, implicit return by setting `pc`. trampoline = sym crate::arm::__aeabi_idiv, ); } A consequence of using a custom calling convention is that such functions cannot be called using a Rust call expression; the compiler simply does not know how to generate correct code for such a call. Instead the compiler will error when the program does try to call an `extern "custom"` function, and the only way to execute the function is using inline assembly. ##### `cfg` on lines of inline assembly The `cfg_asm` feature adds the ability to annotate individual lines of an assembly block with `#[cfg(...)]` or `#[cfg_attr(..., ...)]`. Configuring specific sections of assembly is useful to make assembly depend on, for instance, the target, target features, or feature flags. For example: #![feature(cfg_asm)] global_asm!( // ... // If enabled, initialise the SP. This is normally // initialised by the CPU itself or by a bootloader, but // some debuggers fail to set it when resetting the // target, leading to stack corruptions. #[cfg(feature = "set-sp")] "ldr r0, =_stack_start msr msp, r0", // ... ) This example is from the cortex-m crate that currently has to use a custom macro that duplicates the whole assembly block for every use of `#[cfg(...)]`. With `cfg_asm`, that will no longer be necessary.
blog.rust-lang.org
July 11, 2025 at 11:34 PM
Announcing Rust 1.88.0
The Rust team is happy to announce a new version of Rust, 1.88.0. Rust is a programming language empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via `rustup`, you can get 1.88.0 with: $ 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.88.0. If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please report any bugs you might come across! ## What's in 1.88.0 stable ### Let chains This feature allows `&&`-chaining `let` statements inside `if` and `while` conditions, even intermingling with boolean expressions, so there is less distinction between `if`/`if let` and `while`/`while let`. The patterns inside the `let` sub-expressions can be irrefutable or refutable, and bindings are usable in later parts of the chain as well as the body. For example, this snippet combines multiple conditions which would have required nesting `if let` and `if` blocks before: if let Channel::Stable(v) = release_info() && let Semver { major, minor, .. } = v && major == 1 && minor == 88 { println!("`let_chains` was stabilized in this version"); } Let chains are only available in the Rust 2024 edition, as this feature depends on the `if let` temporary scope change for more consistent drop order. Earlier efforts tried to work with all editions, but some difficult edge cases threatened the integrity of the implementation. 2024 made it feasible, so please upgrade your crate's edition if you'd like to use this feature! ### Naked functions Rust now supports writing naked functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. This is a more ergonomic alternative to defining functions in a `global_asm!` block. A naked function is marked with the `#[unsafe(naked)]` attribute, and its body consists of a single `naked_asm!` call. For example: #[unsafe(naked)] pub unsafe extern "sysv64" fn wrapping_add(a: u64, b: u64) -> u64 { // Equivalent to `a.wrapping_add(b)`. core::arch::naked_asm!( "lea rax, [rdi + rsi]", "ret" ); } The handwritten assembly block defines the _entire_ function body: unlike non-naked functions, the compiler does not add any special handling for arguments or return values. Naked functions are used in low-level settings like Rust's `compiler-builtins`, operating systems, and embedded applications. Look for a more detailed post on this soon! ### Boolean configuration The `cfg` predicate language now supports boolean literals, `true` and `false`, acting as a configuration that is always enabled or disabled, respectively. This works in Rust conditional compilation with `cfg` and `cfg_attr` attributes and the built-in `cfg!` macro, and also in Cargo `target]` tables in both configuration and [manifests. Previously, empty predicate lists could be used for unconditional configuration, like `cfg(all())` for enabled and `cfg(any())` for disabled, but this meaning is rather implicit and easy to get backwards. `cfg(true)` and `cfg(false)` offer a more direct way to say what you mean. See RFC 3695 for more background! ### Cargo automatic cache cleaning Starting in 1.88.0, Cargo will automatically run garbage collection on the cache in its home directory! When building, Cargo downloads and caches crates needed as dependencies. Historically, these downloaded files would never be cleaned up, leading to an unbounded amount of disk usage in Cargo's home directory. In this version, Cargo introduces a garbage collection mechanism to automatically clean up old files (e.g. `.crate` files). Cargo will remove files downloaded from the network if not accessed in 3 months, and files obtained from the local system if not accessed in 1 month. Note that this automatic garbage collection will not take place if running offline (using `--offline` or `--frozen`). Cargo 1.78 and newer track the access information needed for this garbage collection. This was introduced well before the actual cleanup that's starting now, in order to reduce cache churn for those that still use prior versions. If you regularly use versions of Cargo even older than 1.78, in addition to running current versions of Cargo, and you expect to have some crates accessed exclusively by the older versions of Cargo and don't want to re-download those crates every ~3 months, you may wish to set `cache.auto-clean-frequency = "never"` in the Cargo configuration, as described in the docs. For more information, see the original unstable announcement of this feature. Some parts of that design remain unstable, like the `gc` subcommand tracked in cargo#13060, so there's still more to look forward to! ### Stabilized APIs * `Cell::update` * `impl Default for *const T` * `impl Default for *mut T` * `mod ffi::c_str` * `HashMap::extract_if` * `HashSet::extract_if` * `hint::select_unpredictable` * `proc_macro::Span::line` * `proc_macro::Span::column` * `proc_macro::Span::start` * `proc_macro::Span::end` * `proc_macro::Span::file` * `proc_macro::Span::local_file` * `<[T]>::as_chunks` * `<[T]>::as_rchunks` * `<[T]>::as_chunks_unchecked` * `<[T]>::as_chunks_mut` * `<[T]>::as_rchunks_mut` * `<[T]>::as_chunks_unchecked_mut` These previously stable APIs are now stable in const contexts: * `NonNull<T>::replace` * `<*mut T>::replace` * `std::ptr::swap_nonoverlapping` * `Cell::replace` * `Cell::get` * `Cell::get_mut` * `Cell::from_mut` * `Cell::as_slice_of_cells` ### Other changes The `i686-pc-windows-gnu` target has been demoted to Tier 2, as mentioned in an earlier post. This won't have any immediate effect for users, since both the compiler and standard library tools will still be distributed by `rustup` for this target. However, with less testing than it had at Tier 1, it has more chance of accumulating bugs in the future. Check out everything that changed in Rust, Cargo, and Clippy. ## Contributors to 1.88.0 Many people came together to create Rust 1.88.0. We couldn't have done it without all of you. Thanks!
blog.rust-lang.org
June 30, 2025 at 11:30 PM
May Project Goals Update
The Rust project is currently working towards a slate of 40 project goals, with 3 of them designated as Flagship Goals. This post provides selected updates on our progress towards these goals (or, in some cases, lack thereof). The full details for any particular goal are available in its associated tracking issue on the rust-project-goals repository. ## Flagship goals **Bring the Async Rust experience closer to parity with sync Rust** **Why this goal?** This work continues our drive to improve support for async programming in Rust. In 2024H2 we stabilized async closures; explored the generator design space; and began work on the `dynosaur` crate, an experimental proc-macro to provide dynamic dispatch for async functions in traits. In 2025H1 our plan is to deliver (1) improved support for async-fn-in-traits, completely subsuming the functionality of the `async-trait` crate; (2) progress towards sync and async generators, simplifying the creation of iterators and async data streams; (3) and improve the ergonomics of `Pin`, making lower-level async coding more approachable. These items together start to unblock the creation of the next generation of async libraries in the wider ecosystem, as progress there has been blocked on a stable solution for async traits and streams. **What has happened?** **Generators.** Experimental support for an `iter!` macro has landed in nightly. This is intended for nightly-only experimentation and will still need an RFC before it can stabilize. Tracking issue is rust-lang/rust#142269. **Async book.** @nrc has been hard at work filling out the official Async Rust book, recently adding chapters on concurrency primitives, structured concurrency, and pinning. **dynosaur.** A dynosaur RFC was opened describing what blanket impls we think the proc macro should generate for a trait, to make the trait usable as `impl Trait` in argument position in other traits. This is the last remaining open design question before we release dynosaur 0.3 as a candidate for 1.0. Please chime in on the RFC if you have thoughts. 1 detailed update available. Comment by @tmandry posted on 2025-06-09: > **Generators.** Experimental support for an `iter!` macro has landed in nightly. This is intended for nightly-only experimentation and will still need an RFC before it can stabilize. Tracking issue is rust-lang/rust#142269. > > **Async book.** @nrc has been hard at work filling out the official Async Rust book, recently adding chapters on concurrency primitives, structured concurrency, and pinning. > > **dynosaur.** A dynosaur RFC was opened describing what blanket impls we think the proc macro should generate for a trait, to make the trait usable as `impl Trait` in argument position in other traits. This is the last remaining open design question before we release dynosaur 0.3 as a candidate for 1.0. Please chime in on the RFC if you have thoughts. **Organize Rust All-Hands 2025** **Why this goal?** May 15, 2025 marks the 10-year anniversary of Rust's 1.0 release; it also marks 10 years since the creation of the Rust subteams. At the time there were 6 Rust teams with 24 people in total. There are now 57 teams with 166 people. In-person All Hands meetings are an effective way to help these maintainers get to know one another with high-bandwidth discussions. This year, the Rust project will be coming together for RustWeek 2025, a joint event organized with RustNL. Participating project teams will use the time to share knowledge, make plans, or just get to know one another better. One particular goal for the All Hands is reviewing a draft of the Rust Vision Doc, a document that aims to take stock of where Rust is and lay out high-level goals for the next few years. **What has happened?** The **All-Hands** did! More than 150 project members and invited guests attended, making this the largest in-person collaborative event in the history of the Rust project. We celebrated the 10 year birthday of Rust 1.0. With over 300 people, we celebrated, listened to speeches from various former and current team members and contributors, and watched the live release of Rust 1.87.0 on stage. The feedback from the participants was overwhelmingly positive with an average score of 9.5/10. 🎉 The vast majority would like this to be a yearly event -- which Mara started working on. 1 detailed update available. Comment by @m-ou-se posted on 2025-06-19: > Update! > > The all-hands has happened! > > More than 150 project members and invited guests attended, making this the largest in-person collaborative event in the history of the Rust project. > > On Wednesday, several Rust project members gave talks to other project members and (potential) contributors, as part of the "Rust Project Track" at the RustWeek conference. The recordings are available on YouTube. 📹 > > On Thursday, we celebrated the 10 year birthday of Rust 1.0. With over 300 people, we celebrated, listened to speeches from various former and current team members and contributors, and watched the live release of Rust 1.87.0 on stage. > > On Friday and Saturday, the actual Rust All-Hands 2025 took place. For two full days spread over 10 different meeting rooms, both pre-planned and ad-hoc discussions took place on a very wide range of topics. Meeting notes have been collected in this Zulip topic: #all-hands-2025 > Meeting notes! > > Many many long standing issues have been unblocked. Many new ideas were discussed, both small and big. Conflicts were resolved. Plans were made. And many personal connections were formed and improved. ❤ > > I've collected feedback from the participants (67 of you replied so far), and the replies where overwhelmingly positive with an average score of 9.5/10. 🎉 The vast majority would like this to be a yearly event. I've started working on making that happen! > > Thank you all for attending! See you all next year! 🎊 **Stabilize tooling needed by Rust for Linux** **Why this goal?** This goal continues our work from 2024H2 in supporting the experimental support for Rust development in the Linux kernel. Whereas in 2024H2 we were focused on stabilizing required language features, our focus in 2025H1 is stabilizing compiler flags and tooling options. We will (1) implement RFC #3716 which lays out a design for ABI-modifying flags; (2) take the first step towards stabilizing `build-std` by creating a stable way to rebuild core with specific compiler options; (3) extending rustdoc, clippy, and the compiler with features that extract metadata for integration into other build systems (in this case, the kernel's build system). **What has happened?** May saw significant progress on compiler flags, with MCPs for `-Zharden-sls` and `-Zretpoline*` being accepted. Several PRs were in progress (#135927, #140733, #140740) that could potentially be combined, with the implementation approach matching clang's flag naming conventions for consistency. The RFC for configuring no-std externally #3791 entered T-compiler FCP with positive signals, and build-std discussions at the All Hands produced some consensus between libs and compiler teams, though more Cargo team involvement was needed. The Rust for Linux team had strong participation at Rust Week, with many team members attending (Alice, Benno, Björn, Boqun, Gary, Miguel, Trevor). During the All Hands, attendees participated in a fun exercise predicting what percentage of the kernel will be written in Rust by 2035 - currently only about 0.1% of the kernel's 40M total lines are in Rust. On language features, during May we continued work on arbitrary self types v2, where Ding focused on resolving the dichotomy between `Deref::Target` vs `Receiver::Target`. One potential approach discussed was splitting the feature gate to allow arbitrary self types only for types implementing `Deref`, which would cover the kernel use case. For `derive(CoercePointee)`, we continued waiting on PRs #136764 and #136776, with the latter needing diagnostic work. The All Hands meeting also produced interesting developments on field projections, with Benno working on an approach that reuses borrow checker logic to extend what we do for `&` and `&mut` to custom types using the `->` syntax. Alice also presented a new proposal for AFIDT/RPITIDT and placement (discussed here). 2 detailed updates available. Comment by @ojeda posted on 2025-05-20: > Update from our 2025-05-07 meeting (full minutes): > > * Enthusiasm and plans for RustWeek. > > * `arbitrary_self_types`: update from @dingxiangfei2009 at https://rust-lang.zulipchat.com/#narrow/channel/425075-rust-for-linux/topic/2025-05-07.20meeting/near/516734641 -- he plans to talk to types in order to find a solution. @davidtwco will ping @petrochenkov about `rustc_resolve`. > > * Sanitizer support and `#[sanitize(off)]`: discussed by lang at https://github.com/rust-lang/rust/pull/123617#issuecomment-2859621119. Discussion about allowing to disable particular sanitizers. Older concern from compiler at https://github.com/rust-lang/rust/pull/123617#issuecomment-2192330122. > > * `asm_const` with pointers support: lang talked about it -- lang will want an RFC: https://github.com/rust-lang/rust/issues/128464#issuecomment-2861515372. > > * ABI-modifying compiler flags: two MCPs filled: https://github.com/rust-lang/compiler-team/issues/868 (`-Zretpoline` and `-Zretpoline-external-thunk`) and https://github.com/rust-lang/compiler-team/issues/869 (`-Zharden-sls`). > > Implementation PR for `-Zindirect-branch-cs-prefix` at https://github.com/rust-lang/rust/pull/140740 that goes on top of https://github.com/rust-lang/rust/pull/135927. > > @davidtwco agreed there is likely no need for a separate MCP for this last one, i.e. it could go into the `-Zretpoline*` one. @azhogin pinged about this at https://github.com/rust-lang/rust/pull/135927#issuecomment-2859906060. > > * `--crate-attr`: @Mark-Simulacrum was pinged and he is OK to adopt the RFC (https://github.com/rust-lang/rfcs/pull/3791). > > Comment by @nikomatsakis posted on 2025-05-20: > TL;DR: > > The primary focus for this year is compiled flags, and we are continuing to push on the various compiler flags and things that are needed to support building RFL on stable (e.g., RFC #3791 proposed adding `--crate-attr`, which permits injecting attributes into crates externally to allow the Kernel's build process to add things like `#!no_std]` so they don't have to be inserted manually into every file; MCPs for ABI flags like `retpoline` and `harden-sls` and [implementation of `-Zindirect-branch-cs-prefix`). A number of issues had minor design questions (how to manage clippy configuration; best approach for rustdoc tests) and we plan to use the RustWeek time to hash those out. > > We are also finishing up some of the work on language items. We have had two stabilizations of lang features needed by Rust for Linux (naked functions, `asm_goto` syntax). The trickiest bit here is arbitrary self types, where we encountered a concern relating to pin and are still discussing the best resolution. ## Goals looking for help **Promoting Parallel Front End** The main bottleneck is the customization of the dependent `rustc-rayon` library. @oli-obk and @Zoxc are helping to move this forward. _Help wanted:_ Help test the deadlock code in the issue list and try to reproduce the issues. If you'd like to help, please post in this goal's dedicated zulip topic. **Stabilize public/private dependencies** _Help wanted:_ T-compiler people to work on the blocking issues #119428 and #71043. If you'd like to help, please post in this goal's dedicated zulip topic. **Expose experimental LLVM features for GPU offloading** _Help wanted:_ @ZuseZ4: there is only really one issue left which I'd like to see fixed before enabling autodiff on nightly, and that is MacOS support. Most of the MacOS CI already works, we can now build Enzyme, LLVM, and rustc, but later fail when we build Cranelift due to linker flag issues. The person who was looking into it got busy with other things, so I would really appreciate it if someone could pick it up! Otherwise I can also just start by shipping autodiff on Linux only, but given how close we are to MacOS support, I feel like it would be a shame. Since it's only an issue in CI, you don't need an own Mac to help with this. If anyone has time, I'm happy to chat here here or on Zulip/Discord. 3 detailed updates available. Comment by @ZuseZ4 posted on 2025-05-25: > And another round of updates. First of all, Google approved two GSoC projects for the summer, where @Sa4dUs will work on the autodiff frontend and @KMJ-007 will work on the backend. The frontend project is about improving our ABI handling to remove corner-cases around specific types that we currently can not differentiate. If time permits he might also get to re-model our frontend to lower our autodiff macro to a proper rustc intrinsic, which should allow us to simplify our logic a lot. The backend project will look at how Enzyme uses TypeTrees, and create those during the lowering to LLVM-IR. This should allow autodiff to become more reliable, work on debug builds, and generally compile a lot faster. Comment by @ZuseZ4 posted on 2025-05-25: > The last weeks were focused on enabling autodiff in a lot more locations, as well as doing a lot of CI and Cmake work to be able to ship it on nightly. At the same time, autodiff is also gaining increasingly more contributors. That should help a lot with the uptick in issues, which I expect once we enable autodiff in nightly builds. > > **Key developments:** > > 1. @Shourya742 added support for applying autodiff inside of `inherent impl blocks`. https://github.com/rust-lang/rust/pull/140104 > 2. @haenoe added support for applying autodiff to generic functions. https://github.com/rust-lang/rust/pull/140049 > 3. @Shourya742 added an optimization to inline the generated function, removing one layer of indirection. That should improve performance when differentiating tiny functions. https://github.com/rust-lang/rust/pull/139308 > 4. @haenoe added support for applying autodiff to inner (nested) functions. https://github.com/rust-lang/rust/pull/138314 > 5. I have found a bugfix for building rustc with both debug and autodiff enabled. This previously failed during bootstrap. This bugfix also solved the last remaining (compile time) performance regression of the autodiff feature. That means that if we now enable autodiff on nightly, it won't affect compile times for people not using it. https://github.com/rust-lang/rust/pull/140030 > 6. After a hint from Onur I also fixed autodiff check builds:https://github.com/rust-lang/rust/pull/140000, which makes contributing to autodiff easier. > 7. I ran countless experiments on improving and fixing Enzyme's CMake and merged a few PRs into Enzyme. We don't fully support the macos dist runners yet and some of my CMake improvements only live in our Enzyme fork and aren't accepted by upstream yet, but the CI is now able to run longer before failing with the next bug, which should hopefully be easy to fix. At least I already received a hint on how to solve it. > 8. @Shourya742 also helped with an experiment on how to bundle Enzyme with the Rust compiler. We ended up selecting a different distribution path, but the PR was helpful to discuss solutions with Infra contributors. https://github.com/rust-lang/rust/pull/140244 > 9. @Sa4dUs implemented a PR to split our `#[autodiff]` macro into `autodiff_forward` and `autodiff_reverse`. They behave quite differently in some ways that might surprise users, so I decided it's best for now to have them separated, which also will make teaching and documenting easier. https://github.com/rust-lang/rust/pull/140697 > > > **Help Wanted:** There are two or three smaller issues remaining to distribute Enzyme/autodiff. If anyone is open to help, either with bootstrap, CI, or CMake issues, I'd appreciate any support. Please feel free to ping me on Discord, Zulip, or in https://github.com/rust-lang/rust/pull/140064 to discuss what's left to do. > > In general, we solved most of the distribution issues over the last weeks, and autodiff can now be applied to almost all functions. That's a pretty good base, so I will now start to look again more into the GPU support for rustc. Comment by @ZuseZ4 posted on 2025-06-15: > The last three weeks I had success in shifting away from autodiff, towards my other projects. > > **Key developments:** > > 1. I forgot to mention it in a previous update, but I have added support for sret (struct return) handling to std::autodiff, so we now can differentiate a lot more functions reliably. https://github.com/rust-lang/rust/pull/139465 > > 2. I added more support for batched autodiff in: https://github.com/rust-lang/rust/pull/139351 > > 3. I have started working on a std::batching PR, which just allows fusing multiple function calls into one. https://github.com/rust-lang/rust/pull/141637. I am still not fully sure on how to design the frontend, but in general it will allow Array-of-Struct and Struct-of-Array vectorization. Based on a popular feedback I received it's now also generating SIMD types. So you can write your function in a scalar way, and just use the macro to generate a vectorized version which accepts and generates SIMD types. > > 4. My first PR to handle automatic data movement to and from a GPU is up! https://github.com/rust-lang/rust/pull/142097 It can handle data movements for almost arbitrary functions, as long as your function is named `kernel_{num}`, and each of your arguments is a pointer to exactly 256 f32 values. As the next step, I will probably work on the backend to generate the actual kernel launches, so people can run their Rust code on the GPU. Once I have that tested and working I will go back to develop a frontend, to remove the input type limitations and give users a way to manually schedule data transfers. The gpu/offload frontend will likely be very simple compared to my autodiff frontend, so I don't expect many complications and therefore leave it to the end. > > > > **Help Wanted:** > > There is only really one issue left which I'd like to see fixed before enabling autodiff on nightly, and that is MacOS support. Most of the MacOS CI already works, we can now build Enzyme, LLVM, and rustc, but later fail when we build Cranelift due to linker flag issues. The person who was looking into it got busy with other things, so I would really appreciate it if someone could pick it up! Otherwise I can also just start by shipping autodiff on Linux only, but given how close we are to MacOS support, I feel like it would be a shame. Since it's only an issue in CI, you don't need an own Mac to help with this. If anyeone has time, I'm happy to chat here here or on Zulip/Discord. **Null and enum-discriminant runtime checks in debug builds** _Help wanted_ : 1c3t3a: happy to join forces on general checks and for advice what other UB would be great to check!! :). 1 detailed update available. Comment by @1c3t3a posted on 2025-05-22: > Upps, giving another status update here: > > **Key developments** : Landed an extension of the alignment check to include (mutable) borrows in rust#137940. Working on the enums check (no draft PR yet). Hope to open a PR by mid next week. > > **Blockers** : None so far. > > **Help wanted** : Happy to join forces on general checks and for advice what other UB would be great to check!! :) **Optimizing Clippy & linting** _Help wanted:_ Help is appreciated in anything with the `performance-project` label in the Clippy repository. 1 detailed update available. Comment by @blyxyas posted on 2025-05-25: > Monthly update! > > **Key developments:** > > * Documentation lints have been optimized greatly, giving us up to a 13.5% decrease in documentation-heavy crates. See https://github.com/rust-lang/rust-clippy/pull/14693 and https://github.com/rust-lang/rust-clippy/pull/14870 > > * The efforts on getting Clippy benchmarked on the official @rust-timer bot account are getting started by the infra team. This allows us to do per-PR benchmarking instead of fixing performance problems ad-hoc. > > * We need to do further testing on the **early parallel lints effort**. While I have a working patch, no performance improvement has yet been proven. > > * Work on making an interface for a single-lint Clippy, for denoising benchmarks is getting in the works. > > > > **Blockers** The query system not being parallelized. Currently working on a work-around but a parallel query system would make things a lot easier. > > **Help wanted:** Help is appreciated in anything with the `performance-project` label in the Clippy repository. ## Other goal updates **" Stabilizable" prototype for expanded const generics** 1 detailed update available. Comment by @BoxyUwU posted on 2025-05-23: > We should now be correctly deferring evaluation of type system constants making use of generic parameters or inference variables. There's also been some work to make our normalization infrastructure more term agnostic (i.e. work on both types and consts). Camelid's PR mentioned in the previous update has also made great progress. **build-std** Comment by @wesleywiser posted on 2025-06-19: > * @adamgemmell and @davidtwco hosted a session on build-std at the All Hands with members from various teams discussing some of the design questions. > * We've continued our biweekly sync call with lang, compiler and cargo team members. > * @davidtwco and @adamgemmell have been hard at work preparing a compendium detailing the history of build-std and the wg-cargo-std-aware repo. > * Reviewing and editing this document is ongoing and a continuing topic of discussion for the sync call. > * In the last sync call, we discussed: > * Renewing the project goal for another cycle: enthusiastic agreement from many participants. > * Posting updates to the project goal page biweekly after each sync call. > * Discussion on the content and format of the compendium. Most of the content appears to be done but further editing and restructuring will make it clearer and more easily digestible. > 1 detailed update available. **Continue resolving `cargo-semver-checks` blockers for merging into cargo** No detailed updates available. **Declarative ( `macro_rules!`) macro improvements** No detailed updates available. **Evaluate approaches for seamless interop between C++ and Rust** 1 detailed update available. Comment by @tmandry posted on 2025-05-22: > Last week was the Rust All Hands. There were three days of discussions about interop at the all hands, led by @baumanj and including members from the Rust Project and C++ standards bodies as well as the developers of foundational Rust/C++ interop tools. The topics included > > * Comparing differing needs of interop across the industry > * Sharing the design philosophy and approach of different interop tools > * Brainstorming how to tackle common interop problems between the languages, like differences in integer types, memory/object models, and move semantics > * Discussing ways the Rust and C++ languages and toolchains can develop to make interop easier in the future > > > Speaking for myself from the Rust Project side, it was a real pleasure to meet some of the faces from the C++ side! I look forward to working with them more in the future. **Experiment with ergonomic ref-counting** No detailed updates available. **Extend pubgrub to match cargo 's dependency resolution** 1 detailed update available. Comment by @Eh2406 posted on 2025-05-27: > The talk went smoothly and was well received. I had several useful and interesting conversations at Rust Week about effort. That is all I have to report. **Externally Implementable Items** No detailed updates available. **Finish the libtest json output experiment** 1 detailed update available. Comment by @epage posted on 2025-05-21: > * Key developments: > * Moved crates to https://github.com/crate-ci/libtest2 > * Blockers > * Help wanted > **Implement Open API Namespace Support** 1 detailed update available. Comment by @b-naber posted on 2025-06-10: > We have reached an agreement on the compiler implementation, and will implement it in the next 2-3 weeks hopefully. **Implement restrictions, prepare for stabilization** 1 detailed update available. Comment by @jhpratt posted on 2025-05-30: > https://github.com/rust-lang/rust/pull/141754 has been opened to parse `impl` restrictions and lower them to `rustc_middle`. A separate pull request will be opened to enforce the restriction soon after that is merged. **Improve state machine codegen** No detailed updates available. **Instrument the Rust standard library with safety contracts** No detailed updates available. **Making compiletest more maintainable: reworking directive handling** No detailed updates available. **Metrics Initiative** 2 detailed updates available. Comment by @yaahc posted on 2025-05-26: > Quick update, Data is currently being gathered (and has been for almost 2 weeks now) on docs.rs and I should have it uploaded and accessible on the PoC dashboard within the next week or two (depending on how long I want to let the data gather). Comment by @yaahc posted on 2025-06-03: > Bigger Update, > > I've done the initial integration with the data gathered so far since rustweek. I have the data uploaded to the influxdb cloud instance managed by the infra team, I connected the infra team's grafana instance to said influxdb server and I imported my dashboards so we now have fancy graphs with real data on infra managed servers :tada: > > I'm now working with the infra team to see how we can open up access of the graphana dashboard so that anyone can go and poke around and look at the data. > > Another issue that came up is that the influxdb cloud serverless free instance that we're currently using has a mandatory max 30 day retention policy, so either I have to figure out a way to get that disabled on our instance or our data will get steadily deleted and will only be useful as a PoC demo dashboard for a short window of time. **Model coherence in a-mir-formality** No detailed updates available. **Next-generation trait solver** 2 detailed updates available. Comment by @lcnr posted on 2025-05-29: > We have triaged all major regressions discovered by the full crater run. While there are still some untriaged root regressions impacting a single crate, we've either fixed all major regressions or opened fixes to the affected crates in cases where the breakage is intended. We've started to track intended breakage in https://github.com/rust-lang/trait-system-refactor-initiative/issues/211. > > We've fixed quite a few additional issues encountered via crater: https://github.com/rust-lang/rust/pull/140672 https://github.com/rust-lang/rust/pull/140678 https://github.com/rust-lang/rust/pull/140707 https://github.com/rust-lang/rust/pull/140711 https://github.com/rust-lang/rust/pull/140712 https://github.com/rust-lang/rust/pull/140713 https://github.com/rust-lang/rust/pull/141125 https://github.com/rust-lang/rust/pull/141332 https://github.com/rust-lang/rust/pull/141333 https://github.com/rust-lang/rust/pull/141334 https://github.com/rust-lang/rust/pull/141347 https://github.com/rust-lang/rust/pull/141359. > > We are now tracking performance of some benchmarks with the new solver in our test suite and have started to optimize the new solver. Thank you @Kobzol for this! There are a lot of long-hanging fruit so we've made some large improvements already: https://github.com/rust-lang/rust/pull/141442 https://github.com/rust-lang/rust/pull/141500. There are also a bunch of additional improvements in-flight right now, e.g. https://github.com/rust-lang/rust/pull/141451. We still have a few crates which are _significantly_ slower with the new solver, most notably `nalgebra` and `diesel`. I am confident we'll get the new solver a lot more competitive here over the next few months. > > Going forward, we will continue to improve the performance of the new solver. We will also finally work through our backlog of in-process changes and land the new opaque type handling. Comment by @lcnr posted on 2025-05-29: > Ah, also @jackh726 continued to work on integrating the new solver in RustAnalyzer and it looks like we will be able to replace chalk in the near future. **Nightly support for ergonomic SIMD multiversioning** 1 detailed update available. Comment by @veluca93 posted on 2025-05-25: > Key developments: https://github.com/rust-lang/rust/issues/139368 was opened, which poses some possibly-relevant questions on the interaction between the `target_feature` attribute and traits. Otherwise, still trying to get a better understanding of the interaction between target feature and effects. **Prepare const traits for stabilization** 1 detailed update available. Comment by @oli-obk posted on 2025-05-21: > No updates on my side, but we may be going back to the original proposal (modulo syntax) with a syntax that is extensible to more opt-out marker effects without lots of repetition of the `const` keyword **Prototype a new set of Cargo "plumbing" commands** 1 detailed update available. Comment by @epage posted on 2025-05-27: > This has been approved as a GSoC project. **Publish first rust-lang-owned release of "FLS"** 1 detailed update available. Comment by @JoelMarcey posted on 2025-06-01: > Key Developments: A PR is ready for review and merging to update the FLS to be self-sufficient, not relying on external Ferrocene packages for building. This will give us more control of changes we would like to make to the document, including theming, logos, naming, etc. > > Next step: Make some modifications to the FLS content and have it published at https://rust-lang.github.io/fls > > Blockers: Potential blocker around the (re)naming / rebranding of the FLS. **Publish first version of StableMIR on crates.io** No detailed updates available. **Research: How to achieve safety when linking separately compiled code** No detailed updates available. **Run the 2025H1 project goal program** No detailed updates available. **Rust Vision Document** No detailed updates available. **rustc-perf improvements** 2 detailed updates available. Comment by @davidtwco posted on 2025-06-02: > * @Jamesbarford has added the ability to write tests against the database to `rustc-perf` (rust-lang/rustc-perf#2119) > * @Jamesbarford has started to submit parts of rust-lang/rustc-perf#2081 in smaller chunks, with review feedback addressed, starting with rust-lang/rustc-perf#2134 (originally rust-lang/rustc-perf#2096) > * @Jamesbarford has prepared a HackMD describing the design considerations involved in making rustc-perf support multiple collectors. > Comment by @Jamesbarford posted on 2025-06-20: > * @Kobzol & @Jamesbarford collaborated on finishing a workable draft for the new architecture of the `rustc-perf` benchmarking; https://hackmd.io/wq30YNEIQMSFLWWcWDSI9A > * @Kobzol PR enabling backfilling of data, required for the new system design https://github.com/rust-lang/rustc-perf/pull/2161 > * @Jamesbarford PR for creating a cron job and doing a first stage queue of master commits; https://github.com/rust-lang/rustc-perf/pull/2163 > * @Jamesbarford PR for the collectors configuration, holding off merging for the time being as we learn more about the system through building. https://github.com/rust-lang/rustc-perf/pull/2157 > * @Kobzol PR allowing running the database tests on SQLite too; https://github.com/rust-lang/rustc-perf/pull/2152 > **Scalable Polonius support on nightly** 1 detailed update available. Comment by @lqd posted on 2025-05-27: > Here are the key developments for May, though there was a bit less time this month due to the All Hands. > > @amandasystems: A few more rounds of reviews were done on https://github.com/rust-lang/rust/pull/140466 (thanks to lcnr!), and most, if not all, of the feedback has been addressed already. Another PR was opened as a successor, containing another big chunk of work from the initial PR #130227: https://github.com/rust-lang/rust/pull/140737. > > @tage64: The work discussed in the previous updates has been extracted into a few PRs, mostly to do perf runs to be able to gauge the overhead in the in-progress implementation. First, an alternative implementation to rustc's dense bitset, which is used extensively in dataflow analyses such as the ones in the borrow checker, for example. Then, a prototype of the algorithm discussed in prior updates, trying to make the location-sensitive constraints built lazily, as well as the loans in scope themselves. (And the union of these two in #141583) > > @lqd: As discussed in the previous update, I've tried to see if we can limit scope here by evaluating the current algorithm a bit more: the expressiveness it allows, and where it fails. I've also evaluated all the open issues about NLL expressiveness that we hoped to fix, and see the ones we support now or could defer to future improvements. It seems _possible_. I've also started to have some idea of the work needed to make it more production-ready. That includes the experiments made with Tage above, but also trying to lower the total overhead by finding wins in NLLs, and here I e.g. have some improvements in-flight for the dataflow analysis used in liveness. > > All Hands: we discussed with t-types the plan and in-progress PRs about opaque types, how they impact member constraints and in turn the constraint graph and SCCs. Some more work is needed here to ensure member constraints are correctly handled, even though they should only impact the SCCs and not the borrow checking algorithm per se (but there still are possible ambiguity issues if we don't take flow sensitivity into account here). > > (Fun and interesting aside: there's an RFC to add a polonius-like lifetime analysis to clang) **Secure quorum-based cryptographic verification and mirroring for crates.io** No detailed updates available. **Stabilize cargo-script** 1 detailed update available. Comment by @epage posted on 2025-05-21: > Key developments: > > * rust-lang/rust#140035 has been merged > > > Blockers: > > Help wanted: **SVE and SME on AArch64** 1 detailed update available. Comment by @davidtwco posted on 2025-05-07: > * We've resolved a handful of rounds of feedback on rust-lang/rust#137944 from @oli-obk, @lcnr and @fee1-dead; resolved issues from a crater run (bar one); and worked to decrease the performance regression. > * We've removed the constness parts of the patch to make it smaller and easier to review. Constness will come in a Part II. > * There's currently a -1% mean regression (min 0.1%, max 5.3%) that we're working to improve, but starting to run out of ideas. Regressions are just a consequence of the compiler having to prove more things with the addition of `MetaSized` bounds, rather than hot spots in newly introduced code. > * Given the large impact of the change, we ran a crater run and found three distinct issues, two have been fixed. The remaining issue is a overflow in a single niche crate which we're working out how we can resolve. > * We're largely just waiting on hearing from our reviewers what would be needed to see this change land. > * We've not made any changes to the Sized Hierarchy RFC, there's a small amount of discussion which will be responded to once the implementation has landed. > * We're working on changes to the SVE RFC which further clarifies that the language changes are decided by the Sized RFC and that the SVE RFC is only proposing the forever-unstable `repr(scalable)` attribute which are non-`const Sized` and lower to `vscale` in LLVM. > Comment by @davidtwco posted on 2025-06-02: > * rust-lang/rust#137944 is ready! It's in a t-types FCP to merge as there's a small unavoidable breakage (unless we wanted to wait for the new trait solver). > * Once this is merged, I'll work on a `#[rustc_no_implicit_bounds]` attribute for tests, testing whether `Deref::Target` can be relaxed, and Part II. > * I've still not made any changes to the Sized Hierarchy RFC, there's a small amount of discussion which will be responded to once the implementation has landed. > **Unsafe Fields** 1 detailed update available. Comment by @jswrenn posted on 2025-05-22: > **Key developments:** No significant developments since previous updates. > > **Blockers:** Waiting on lang team review. **Use annotate-snippets for rustc diagnostic output** No detailed updates available.
blog.rust-lang.org
June 30, 2025 at 11:30 PM
Rust compiler performance survey 2025
We're launching a Rust Compiler Performance Survey. Long compile times of Rust code are frequently being cited as one of the biggest challenges limiting the productivity of Rust developers. Rust compiler contributors are of course aware of that, and they are continuously working to improve the situation, by finding new ways of speeding up the compiler, triaging performance regressions and measuring our long-term performance improvements. Recently, we also made progress on some large changes that have been in the making for a long time, which could significantly improve compiler performance by default. When we talk about compilation performance, it is important to note that it is not always so simple as determining how long does it take `rustc` to compile a crate. There are many diverse development workflows that might have competing trade-offs, and that can be bottlenecked by various factors, such as the integration of the compiler with the used build system. In order to better understand these workflows, we have prepared a Rust Compiler Performance Survey. This survey is focused specifically on compilation performance, which allows us to get more detailed data than what we usually get from the annual State of Rust survey. The data from this survey will help us find areas where we should focus our efforts on improving the productivity of Rust developers. **You can fill out the surveyhere.** Filling the survey should take you approximately 10 minutes, and the survey is fully anonymous. We will accept submissions until Monday, July 7th, 2025. After the survey ends, we will evaluate the results and post key insights on this blog. We invite you to fill the survey, as your responses will help us improve Rust compilation performance. Thank you!
blog.rust-lang.org
June 23, 2025 at 11:21 PM
Demoting i686-pc-windows-gnu to Tier 2
In Rust 1.88.0, the Tier 1 target `i686-pc-windows-gnu` will be demoted to Tier 2. As a Tier 2 Target, builds will continue to be distributed for both the standard library and the compiler. ## Background Rust has supported Windows for a long time, with two different flavors of Windows targets: MSVC-based and GNU-based. MSVC-based targets (for example the most popular Windows target `x86_64-pc-windows-msvc`) use Microsoft’s native linker and libraries, while GNU-based targets (like `i686-pc-windows-gnu`) are built entirely from free software components like `gcc`, `ld`, and mingw-w64. The major reason to use a GNU-based toolchain instead of the native MSVC-based one is cross-compilation and licensing. `link.exe` only runs on Windows (barring Wine hacks) and requires a license for commercial usage. `x86_64-pc-windows-gnu` and `i686-pc-windows-gnu` are currently both Tier 1 with host tools. The Target Tier Policy contains more details on what this entails, but the most important part is that tests for these targets are being run on every merged PR. This is the highest level of support we have, and is only used for the most high value targets (the most popular Linux, Windows, and Apple targets). The `*-windows-gnu` targets currently do not have any dedicated target maintainers. We do not have a lot of expertise for this toolchain, and issues often aren't fixed and cause problems in CI that we have a hard time to debug. The 32-bit version of this target is especially problematic and has significantly less usage than `x86_64-pc-windows-gnu`, which is why `i686-pc-windows-gnu` is being demoted to Tier 2. ## What changes? After Rust 1.88.0, `i686-pc-windows-gnu` will now be Tier 2 with host tools. For users, nothing will change immediately. Builds of both the standard library and the compiler will still be distributed by the Rust Project for use via `rustup` or alternative installation methods. This does mean that this target will likely accumulate bugs faster in the future because of the reduced testing. ## Future If no maintainers are found and the `*-windows-gnu` targets continue causing problems, they may be demoted further. No concrete plans about this have been made yet. If you rely on the `*-windows-gnu` targets and have expertise in this area, we would be very happy to have you as a target maintainer. You can check the Target Tier Policy for what exactly that would entail. For more details on the motivation of the demotion, see RFC 3771 which proposed this change.
blog.rust-lang.org
June 2, 2025 at 10:25 PM
Announcing Rust 1.87.0 and ten years of Rust!
Live from the 10 Years of Rust celebration in Utrecht, Netherlands, the Rust team is happy to announce a new version of Rust, 1.87.0! Today's release day happens to fall exactly on the 10 year anniversary of Rust 1.0! Thank you to the myriad contributors who have worked on Rust, past and present. Here's to many more decades of Rust! 🎉 * * * As usual, the new version includes all the changes that have been part of the beta version in the past six weeks, following the consistent regular release cycle that we have followed since Rust 1.0. If you have a previous version of Rust installed via `rustup`, you can get 1.87.0 with: $ 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.87.0. If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please report any bugs you might come across! ## What's in 1.87.0 stable ### Anonymous pipes 1.87 adds access to anonymous pipes to the standard library. This includes integration with `std::process::Command`'s input/output methods. For example, joining the stdout and stderr streams into one is now relatively straightforward, as shown below, while it used to require either extra threads or platform-specific functions. use std::process::Command; use std::io::Read; let (mut recv, send) = std::io::pipe()?; let mut command = Command::new("path/to/bin") // Both stdout and stderr will write to the same pipe, combining the two. .stdout(send.try_clone()?) .stderr(send) .spawn()?; let mut output = Vec::new(); recv.read_to_end(&mut output)?; // It's important that we read from the pipe before the process exits, to avoid // filling the OS buffers if the program emits too much output. assert!(command.wait()?.success()); ### Safe architecture intrinsics Most `std::arch` intrinsics that are unsafe only due to requiring target features to be enabled are now callable in safe code that has those features enabled. For example, the following toy program which implements summing an array using manual intrinsics can now use safe code for the core loop. #![forbid(unsafe_op_in_unsafe_fn)] use std::arch::x86_64::*; fn sum(slice: &[u32]) -> u32 { #[cfg(target_arch = "x86_64")] { if is_x86_feature_detected!("avx2") { // SAFETY: We have detected the feature is enabled at runtime, // so it's safe to call this function. return unsafe { sum_avx2(slice) }; } } slice.iter().sum() } #[target_feature(enable = "avx2")] #[cfg(target_arch = "x86_64")] fn sum_avx2(slice: &[u32]) -> u32 { // SAFETY: __m256i and u32 have the same validity. let (prefix, middle, tail) = unsafe { slice.align_to::<__m256i>() }; let mut sum = prefix.iter().sum::<u32>(); sum += tail.iter().sum::<u32>(); // Core loop is now fully safe code in 1.87, because the intrinsics require // matching target features (avx2) to the function definition. let mut base = _mm256_setzero_si256(); for e in middle.iter() { base = _mm256_add_epi32(base, *e); } // SAFETY: __m256i and u32 have the same validity. let base: [u32; 8] = unsafe { std::mem::transmute(base) }; sum += base.iter().sum::<u32>(); sum } ### `asm!` jumps to Rust code Inline assembly (`asm!`) can now jump to labeled blocks within Rust code. This enables more flexible low-level programming, such as implementing optimized control flow in OS kernels or interacting with hardware more efficiently. * The `asm!` macro now supports a label operand, which acts as a jump target. * The label must be a block expression with a return type of `()` or `!`. * The block executes when jumped to, and execution continues after the `asm!` block. * Using output and label operands in the same `asm!` invocation remains unstable. unsafe { asm!( "jmp {}", label { println!("Jumped from asm!"); } ); } For more details, please consult the reference. ### Precise capturing (`+ use<...>`) in `impl Trait` in trait definitions This release stabilizes specifying the specific captured generic types and lifetimes in trait definitions using `impl Trait` return types. This allows using this feature in trait definitions, expanding on the stabilization for non-trait functions in 1.82. Some example desugarings: trait Foo { fn method<'a>(&'a self) -> impl Sized; // ... desugars to something like: type Implicit1<'a>: Sized; fn method_desugared<'a>(&'a self) -> Self::Implicit1<'a>; // ... whereas with precise capturing ... fn precise<'a>(&'a self) -> impl Sized + use<Self>; // ... desugars to something like: type Implicit2: Sized; fn precise_desugared<'a>(&'a self) -> Self::Implicit2; } ### Stabilized APIs * `Vec::extract_if` * `vec::ExtractIf` * `LinkedList::extract_if` * `linked_list::ExtractIf` * `<[T]>::split_off` * `<[T]>::split_off_mut` * `<[T]>::split_off_first` * `<[T]>::split_off_first_mut` * `<[T]>::split_off_last` * `<[T]>::split_off_last_mut` * `String::extend_from_within` * `os_str::Display` * `OsString::display` * `OsStr::display` * `io::pipe` * `io::PipeReader` * `io::PipeWriter` * `impl From<PipeReader> for OwnedHandle` * `impl From<PipeWriter> for OwnedHandle` * `impl From<PipeReader> for Stdio` * `impl From<PipeWriter> for Stdio` * `impl From<PipeReader> for OwnedFd` * `impl From<PipeWriter> for OwnedFd` * `Box<MaybeUninit<T>>::write` * `impl TryFrom<Vec<u8>> for String` * `<*const T>::offset_from_unsigned` * `<*const T>::byte_offset_from_unsigned` * `<*mut T>::offset_from_unsigned` * `<*mut T>::byte_offset_from_unsigned` * `NonNull::offset_from_unsigned` * `NonNull::byte_offset_from_unsigned` * `<uN>::cast_signed` * `NonZero::<uN>::cast_signed`. * `<iN>::cast_unsigned`. * `NonZero::<iN>::cast_unsigned`. * `<uN>::is_multiple_of` * `<uN>::unbounded_shl` * `<uN>::unbounded_shr` * `<iN>::unbounded_shl` * `<iN>::unbounded_shr` * `<iN>::midpoint` * `<str>::from_utf8` * `<str>::from_utf8_mut` * `<str>::from_utf8_unchecked` * `<str>::from_utf8_unchecked_mut` These previously stable APIs are now stable in const contexts: * `core::str::from_utf8_mut` * `<[T]>::copy_from_slice` * `SocketAddr::set_ip` * `SocketAddr::set_port`, * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port`, * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `char::is_digit` * `char::is_whitespace` * `<[[T; N]]>::as_flattened` * `<[[T; N]]>::as_flattened_mut` * `String::into_bytes` * `String::as_str` * `String::capacity` * `String::as_bytes` * `String::len` * `String::is_empty` * `String::as_mut_str` * `String::as_mut_vec` * `Vec::as_ptr` * `Vec::as_slice` * `Vec::capacity` * `Vec::len` * `Vec::is_empty` * `Vec::as_mut_slice` * `Vec::as_mut_ptr` ### `i586-pc-windows-msvc` target removal The Tier 2 target `i586-pc-windows-msvc` has been removed. `i586-pc-windows-msvc`'s difference to the much more popular Tier 1 target `i686-pc-windows-msvc` is that `i586-pc-windows-msvc` does not require SSE2 instruction support. But Windows 10, the minimum required OS version of all `windows` targets (except the `win7` targets), requires SSE2 instructions itself. All users currently targeting `i586-pc-windows-msvc` should migrate to `i686-pc-windows-msvc`. You can check the Major Change Proposal for more information. ### Other changes Check out everything that changed in Rust, Cargo, and Clippy. ## Contributors to 1.87.0 Many people came together to create Rust 1.87.0. We couldn't have done it without all of you. Thanks!
blog.rust-lang.org
May 25, 2025 at 10:24 PM
Announcing Google Summer of Code 2025 selected projects
The Rust Project is participating in Google Summer of Code (GSoC) again this year. GSoC is a global program organized by Google that is designed to bring new contributors to the world of open-source. In March, we published a list of GSoC project ideas, and started discussing these projects with potential GSoC applicants on our Zulip. We had many interesting discussions with the potential contributors, and even saw some of them making non-trivial contributions to various Rust Project repositories, even before GSoC officially started! After the initial discussions, GSoC applicants prepared and submitted their project proposals. We received 64 proposals this year, almost exactly the same number as last year. We are happy to see that there was again so much interest in our projects. A team of mentors primarily composed of Rust Project contributors then thoroughly examined the submitted proposals. GSoC required us to produce a ranked list of the best proposals, which was a challenging task in itself since Rust is a big project with many priorities! Same as last year, we went through several rounds of discussions and considered many factors, such as prior conversations with the given applicant, the quality of their proposal, the importance of the proposed project for the Rust Project and its wider community, but also the availability of mentors, who are often volunteers and thus have limited time available for mentoring. As is usual in GSoC, even though some project topics received multiple proposals1, we had to pick only one proposal per project topic. We also had to choose between great proposals targeting different work to avoid overloading a single mentor with multiple projects. In the end, we narrowed the list down to a smaller number of the best proposals that we could still realistically support with our available mentor pool. We submitted this list and eagerly awaited how many of them would be accepted into GSoC. ## Selected projects On the 8th of May, Google has announced the accepted projects. We are happy to share that **19** Rust Project proposals were accepted by Google for Google Summer of Code 2025. That's a lot of projects, which makes us super excited about GSoC 2025! Below you can find the list of accepted proposals (in alphabetical order), along with the names of their authors and the assigned mentor(s): * **ABI/Layout handling for the automatic differentiation feature** by Marcelo Domínguez, mentored by Manuel Drehwald and Oli Scherer * **Add safety contracts** by Dawid Lachowicz, mentored by Michael Tautschnig * **Bootstrap of rustc with rustc_codegen_gcc** by Michał Kostrubiec, mentored by antoyo * **Cargo: Build script delegation** by Naman Garg, mentored by Ed Page * **Distributed and resource-efficient verification** by Zhou Jiping, mentored by Michael Tautschnig * **Enable Witness Generation in cargo-semver-checks** by Talyn Veugelers, mentored by Predrag Gruevski * **Extend behavioural testing of std::arch intrinsics** by Madhav Madhusoodanan, mentored by Amanieu d'Antras * **Implement merge functionality in bors** by Sakibul Islam, mentored by Jakub Beránek * **Improve bootstrap** by Shourya Sharma, mentored by Jakub Beránek, Jieyou Xu and Onur Özkan * **Improve Wild linker test suites** by Kei Akiyama, mentored by David Lattimore * **Improving the Rustc Parallel Frontend: Parallel Macro Expansion** by Lorrens, mentored by Sparrow Li * **Make cargo-semver-checks faster** by JosephC, mentored by Predrag Gruevski * **Make Rustup Concurrent** by Francisco Gouveia, mentored by rami3l * **Mapping the Maze of Rust's UI Test Suite with Established Continuous Integration Practices** by Julien Robert, mentored by Jieyou Xu * **Modernising the libc Crate** by Abdul Muiz, mentored by Trevor Gross * **New proc-macro Server API for Rust-Analyzer** by Neil Wang, mentored by Lukas Wirth * **Prepare stable_mir crate for publishing** by Makai, mentored by Celina Val * **Prototype an alternative architecture for cargo fix using cargo check** by Glen Thalakottur, mentored by Ed Page * **Prototype Cargo Plumbing Commands** by Vito Secona, mentored by Cassaundra **Congratulations to all applicants whose project was selected!** The mentors are looking forward to working with you on these exciting projects to improve the Rust ecosystem. You can expect to hear from us soon, so that we can start coordinating the work on your GSoC projects. We would also like to thank all the applicants whose proposal was sadly not accepted, for their interactions with the Rust community and contributions to various Rust projects. There were some great proposals that did not make the cut, in large part because of limited mentorship capacity. However, even if your proposal was not accepted, we would be happy if you would consider contributing to the projects that got you interested, even outside GSoC! Our project idea list is still actual and could serve as a general entry point for contributors that would like to work on projects that would help the Rust Project maintainers and the Rust ecosystem. Some of the Rust Project Goals are also looking for help. There is also a good chance we'll participate in GSoC next year as well (though we can't promise anything at this moment), so we hope to receive your proposals again in the future! The accepted GSoC projects will run for several months. After GSoC 2025 finishes (in autumn of 2025), we will publish a blog post in which we will summarize the outcome of the accepted projects. 1. The most popular project topic received seven different proposals! ↩
blog.rust-lang.org
May 15, 2025 at 10:19 PM
Announcing rustup 1.28.2
The rustup team is happy to announce the release of rustup version 1.28.2. Rustup is the recommended tool to install Rust, a programming language that empowers everyone to build reliable and efficient software. ## What's new in rustup 1.28.2 The headlines of this release are: * The cURL download backend and the native-tls TLS backend are now officially deprecated and a warning will start to show up when they are used. pr#4277 * While rustup predates reqwest and rustls, the rustup team has long wanted to standardize on an HTTP + TLS stack with more components in Rust, which should increase security, potentially improve performance, and simplify maintenance of the project. With the default download backend already switched to reqwest since 2019, the team thinks it is time to focus maintenance on the default stack powered by these two libraries. * For people who have set `RUSTUP_USE_CURL=1` or `RUSTUP_USE_RUSTLS=0` in their environment to work around issues with rustup, please try to unset these after upgrading to 1.28.2 and file an issue if you still encounter problems. * The version of `rustup` can be pinned when installing via `rustup-init.sh`, and `rustup self update` can be used to upgrade/downgrade rustup 1.28.2+ to a given version. To do so, set the `RUSTUP_VERSION` environment variable to the desired version (for example `1.28.2`). pr#4259 * `rustup set auto-install disable` can now be used to disable automatic installation of the toolchain. This is similar to the `RUSTUP_AUTO_INSTALL` environment variable introduced in 1.28.1 but with a lower priority. pr#4254 * Fixed a bug in Nushell integration that might generate invalid commands in the shell configuration. Reinstalling rustup might be required for the fix to work. pr#4265 ## How to update If you have a previous version of rustup installed, getting the new one is as easy as stopping any programs which may be using rustup (e.g. closing your IDE) and running: $ rustup self update Rustup will also automatically update itself at the end of a normal toolchain update: $ rustup update If you don't have it already, you can get rustup from the appropriate page on our website. Rustup's documentation is also available in the rustup book. ## Caveats Rustup releases can come with problems not caused by rustup itself but just due to having a new release. In particular, anti-malware scanners might block rustup or stop it from creating or copying files, especially when installing `rust-docs` which contains many small files. Issues like this should be automatically resolved in a few weeks when the anti-malware scanners are updated to be aware of the new rustup release. ## Thanks Thanks again to all the contributors who made this rustup release possible!
blog.rust-lang.org
May 15, 2025 at 10:19 PM
crates.io security incident: improperly stored session cookies
Today the crates.io team discovered that the contents of the `cargo_session` cookie were being persisted to our error monitoring service, Sentry, as part of event payloads sent when an error occurs in the crates.io backend. The value of this cookie is a signed value that identifies the currently logged in user, and therefore these cookie values could be used to impersonate any logged in user. Sentry access is limited to a trusted subset of the crates.io team, Rust infrastructure team, and the crates.io on-call rotation team, who already have access to the production environment of crates.io. There is no evidence that these values were ever accessed or used. Nevertheless, out of an abundance of caution, we have taken these actions today: 1. We have merged and deployed a change to redact all cookie values from all Sentry events. 2. We have invalidated all logged in sessions, thus making the cookies stored in Sentry useless. In effect, this means that every crates.io user has been logged out of their browser session(s). Note that API tokens are **not** affected by this: they are transmitted using the `Authorization` HTTP header, and were already properly redacted before events were stored in Sentry. All existing API tokens will continue to work. We apologise for the inconvenience. If you have any further questions, please contact us on Zulip or GitHub.
blog.rust-lang.org
April 17, 2025 at 10:12 PM
March Project Goals Update
The Rust project is currently working towards a slate of 40 project goals, with 3 of them designated as Flagship Goals. This post provides selected updates on our progress towards these goals (or, in some cases, lack thereof). The full details for any particular goal are available in its associated tracking issue on the rust-project-goals repository. ## Flagship goals **Bring the Async Rust experience closer to parity with sync Rust** **Why this goal?** This work continues our drive to improve support for async programming in Rust. In 2024H2 we stabilized async closures; explored the generator design space; and began work on the `dynosaur` crate, an experimental proc-macro to provide dynamic dispatch for async functions in traits. In 2025H1 our plan is to deliver (1) improved support for async-fn-in-traits, completely subsuming the functionality of the `async-trait` crate; (2) progress towards sync and async generators, simplifying the creation of iterators and async data streams; (3) and improve the ergonomics of `Pin`, making lower-level async coding more approachable. These items together start to unblock the creation of the next generation of async libraries in the wider ecosystem, as progress there has been blocked on a stable solution for async traits and streams. **What has happened?** **Generators.** Initial implementation work has started on an `iter!` macro experiment in https://github.com/rust-lang/rust/pull/137725. Discussions have centered around whether the macro should accept blocks in addition to closures, whether thunk closures with an empty arguments list should implement `IntoIterator`, and whether blocks should evaluate to a type that is `Iterator` as well as `IntoIterator`. See the design meeting notes for more. **dynosaur.** We released dynosaur v0.2.0 with some critical bug fixes and one breaking change. We have several more breaking changes queued up for an 0.3 release line that we also use plan to use as a 1.0 candidate. **Pin ergonomics.** https://github.com/rust-lang/rust/pull/135733 landed to implement `&pin const self` and `&pin mut self` sugars as part of the ongoing pin ergonomics experiment. Another PR is open with an early implementation of applying this syntax to borrowing expressions. There has been some discussion within parts of the lang team on whether to prefer this `&pin mut T` syntax or `&mut pin T`, the latter of which applies equally well to `Box<pin T>` but requires an edition. No detailed updates available. **Organize Rust All-Hands 2025** **Why this goal?** May 15, 2025 marks the 10-year anniversary of Rust's 1.0 release; it also marks 10 years since the creation of the Rust subteams. At the time there were 6 Rust teams with 24 people in total. There are now 57 teams with 166 people. In-person All Hands meetings are an effective way to help these maintainers get to know one another with high-bandwidth discussions. This year, the Rust project will be coming together for RustWeek 2025, a joint event organized with RustNL. Participating project teams will use the time to share knowledge, make plans, or just get to know one another better. One particular goal for the All Hands is reviewing a draft of the Rust Vision Doc, a document that aims to take stock of where Rust is and lay out high-level goals for the next few years. **What has happened?** > * Invite more guests, after deciding on who else to invite. (To be discussed today in the council meeting.) > * Figure out if we can fund the travel+hotel costs for guests too. (To be discussed today in the council meeting.) > Mara has asked all attendees for suggestions for guests to invite. Based on that, Mara has invited roughly 20 guests so far. Only two of them needed funding for their travel, which we can cover from the same travel budget. > * Open the call for proposals for talks for the Project Track (on wednesday) as part of the RustWeek conference. > The Rust Project Track at RustWeek has been published: https://rustweek.org/schedule/wednesday/ This track is filled with talks that are relevant to folks attending the all-hands afterwards. 1 detailed update available. Comment by @m-ou-se posted on 2025-04-01: > > * Invite more guests, after deciding on who else to invite. (To be discussed today in the council meeting.) >> * Figure out if we can fund the travel+hotel costs for guests too. (To be discussed today in the council meeting.) >> > > I've asked all attendees for suggestions for guests to invite. Based on that, I've invited roughly 20 guests so far. Only two of them needed funding for their travel, which we can cover from the same travel budget. **Stabilize tooling needed by Rust for Linux** **Why this goal?** This goal continues our work from 2024H2 in supporting the experimental support for Rust development in the Linux kernel. Whereas in 2024H2 we were focused on stabilizing required language features, our focus in 2025H1 is stabilizing compiler flags and tooling options. We will (1) implement RFC #3716 which lays out a design for ABI-modifying flags; (2) take the first step towards stabilizing `build-std` by creating a stable way to rebuild core with specific compiler options; (3) extending rustdoc, clippy, and the compiler with features that extract metadata for integration into other build systems (in this case, the kernel's build system). **What has happened?** Most of the major items are in an iteration phase. The rustdoc changes for exporting doctests are the furthest along, with a working prototype; the RFL project has been integrating that prototype and providing feedback. Clippy stabilization now has a pre-RFC and there is active iteration towards support for build-std. Other areas of progress: * We have an open PR to stabilize `-Zdwarf-version`. * The lang and types team have been discussing the best path forward to resolve #136702. This is a soundness concern that was raised around certain casts, specifically, casts from a type like `*mut dyn Foo + '_` (with some lifetime) to `*mut dyn Foo + 'static` (with a static lifetime). Rust's defaulting rules mean that the latter is more commonly written with a defaulted lifetime, i.e., just `*mut dyn Foo`, which makes this an easy footgun. This kind of cast has always been dubious, as it disregards the lifetime in a rather subtle way, but when combined with arbitrary self types it permits users to disregard safety invariants making it hard to enforce soundness (see #136702 for details). The current proposal under discussion in #136776 is to make this sort of cast a hard error at least outside of an unsafe block; we evaluated the feasibility of doing a future-compatibility-warning and found it was infeasible. Crater runs suggest very limited fallout from this soundness fix but discussion continues about the best set of rules to adopt so as to balance minimizing fallout with overall language simplicity. 2 detailed updates available. Comment by @nikomatsakis posted on 2025-03-13: > Update from our 2025-03-12 meeting (full minutes): > > * RFL team requests someone to look at #138368 which is needed by kernel, @davidtwco to do so. > * `-Zbinary-dep-info` may not be needed; RFL may be able to emulate it. > * `rustdoc` changes for exporting doctests are being incorporated. @GuillaumeGomez is working on the kernel side of the feature too. @ojeda thinks it would be a good idea to do it in a way that does not tie both projects too much, so that `rustdoc` has more flexibility to change the output later on. > * Pre-RFC authored for clippy stabilization. > * Active iteration on the build-std design; feedback being provided by cargo team. > * @wesleywiser sent a PR to stabilize `-Zdwarf-version`. > * RfL doesn't use `cfg(no_global_oom_handling)` anymore. Soon, stable/LTS kernels that support several Rust versions will not use it either. Thus upstream Rust could potentially remove the `cfg` without breaking Linux, though other users like Windows may be still using it (#**t-libs >no_global_oom_handling removal**). > * Some discussion about best way forward for disabling orphan rule to allow experimentation with no firm conclusion. > Comment by @nikomatsakis posted on 2025-03-26: > Updates from today's meeting: > > ### Finalizing 2024h2 goals > > * asm-goto is now stabilized! will be released in 1.87. > * asm-const has a preliminary impl, gcc support is needed. > * While not used in RFL, `naked_asm` is not on the list but it will be moving forward for stabilization. It suffers from the same LLVM bug as `global_asm` forgetting target feature flags. > > > ### ABI-modifying compiler flags > > * Andrew Zhogin has opened a draft PR (https://github.com/rust-lang/rust/pull/138736) following Alice's issue about which santisers should be modifiers (https://github.com/rust-lang/rust/issues/138453) > > > ### Extract dependency information, configure no-std externally (-Zcrate-attr) > > * We decided we don't need to be able to extract dependency information > * `-Zcrate-attr` has an RFC from jyn: https://github.com/rust-lang/rfcs/pull/3791 > > > ### Rustdoc features to extract doc tests > > * No update. > > > ### Clippy configuration > > * Pre-RFC was published but hasn't (to our knowledge) made progress. Would be good to sync up on next steps with @flip1995. > > > ### Build-std > > * No update. Progress will resume next week when the contributor working on this returns from holiday. > > > ### `-Zsanitize-kcfi-arity` > > * Added this as a new deliverable. These kind of "emerging codegen flag" requests can be expected from time to time. Notes available here and here. > * The PR has been reviewed and is unblocked to land. > ## Goals looking for help **Promoting Parallel Front End** _Help wanted:_ Help test the deadlock code in the issue list and try to reproduce the issues. If you'd like to help, please post in this goal's dedicated zulip topic. 1 detailed update available. Comment by @SparrowLii posted on 2025-03-18: > * **Key developments:** Several deadlock issue that remain for more than a year were resolved by #137731 The new test suit for parallel front end is being improved > * **Blockers:** null > * **Help wanted:** Help test the deadlock code in the issue list and try to reproduce the issue > **Stabilize public/private dependencies** _Help wanted:_ T-compiler people to work on the blocking issues #119428 and #71043. If you'd like to help, please post in this goal's dedicated zulip topic. 1 detailed update available. Comment by @epage posted on 2025-03-17: > * Key developments: @tgross35 got rust-lang/rust#135501 merged which improved which made progress on rust-lang/rust#119428, one of the two main blockers. In rust-lang/rust#119428, we've further discussed further designs and trade offs. > * Blockers: Further work on rust-lang/rust#119428 and rust-lang/rust#71043 > * Help wanted: T-compiler people to work on those above issues. > ## Other goal updates **" Stabilizable" prototype for expanded const generics** 1 detailed update available. Comment by @BoxyUwU posted on 2025-03-17: > camelids PR has been merged, we now correctly (to the best of my knowledge) lower const paths under mgca. I have a PR open to ensure that we handle evaluation of paths to consts with generics or inference variables correctly, and that we do not attempt to evaluate constants before they have been checked to be well formed. I'm also currently mentoring someone to implement proper handling of normalization of inherent associated constants under mgca. **build-std** 1 detailed update available. Comment by @davidtwco posted on 2025-03-03: > A small update, @adamgemmell shared revisions to the aforementioned document, further feedback to which is being addressed. **Continue resolving `cargo-semver-checks` blockers for merging into cargo** Earlier this month, we completed one checkbox of the goal: `#[doc(hidden)]` in sealed trait analysis, live in `cargo-semver-checks` v0.40. We also made significant progress on type system modeling, which is part of two more checkboxes. * We shipped method receiver types in our schema, enabling more than a dozen new lints. * We have a draft schema for `?Sized` bounds, and are putting the finishing touches on `'static` and "outlives" bounds. More lints will follow here. * We also have a draft schema for the new `use<>` precise capturing syntax. Additionally, `cargo-semver-checks` is participating in Google Summer of Code, so this month we had the privilege of merging many contributions from new contributors who are considering applying for GSoC with us! We're looking forward to this summer, and would like to wish the candidates good luck in the application process! 1 detailed update available. Comment by @obi1kenobi posted on 2025-03-08: > **Key developments:** > > * Sealed trait analysis correctly handles `#[doc(hidden)]` items. This completes one checkbox of this goal! > * We shipped a series of lints detecting breakage in generic types, lifetimes, and const generics. One of them has already caught accidental breakage in the real world! > > > `cargo-semver-checks` v0.40, released today, includes a variety of improvements to sealed trait analysis. They can be summarized as "smarter, faster, more correct," and will have an immediate positive impact on popular crates such as `diesel` and `zerocopy`. > > While we already shipped a series of lints detecting generics-related breakage, more work is needed to complete that checkbox. This, and the "special cases like `'static` and `?Sized`", will be the focus of upcoming work. **Declarative ( `macro_rules!`) macro improvements** No detailed updates available. **Evaluate approaches for seamless interop between C++ and Rust** 1 detailed update available. Comment by @tmandry posted on 2025-03-25: > Since our last update, there has been talk of dedicating some time at the Rust All Hands for interop discussion; @baumanj and @tmandry are going to work on fleshing out an agenda. @cramertj and @tmandry brainstormed with @oli-obk (who was very helpful) about ways of supporting a more ambitious "template instantiation from Rust" goal, and this may get turned into a prototype at some point. **Experiment with ergonomic ref-counting** There is now an early prototype available that allows you to write `x.use`; if the type of `X` implements `UseCloned`, then this is equivalent to `x.clone()`, else it is equivalent to a move. This is not the desired end semantics in a few ways, just a step along the road. Nothing to see here (yet). 1 detailed update available. Comment by @nikomatsakis posted on 2025-03-17: > Update: rust-lang/rust#134797 has landed. > > Semantics as implemented in the PR: > > * Introduced a trait `UseCloned` implemented for `Rc` and `Arc` types. > * `x.use` checks whether `x`'s type `X` implements the `UseCloned` trait; if so, then `x.use` is equivalent to `x.clone()`, otherwise it is a copy/move of `x`; > * `use || ...x...` closures act like `move` closures but respect the `UseCloned` trait, so they will either `clone`, copy, or move `x` as appropriate. > > > Next steps: > > * Modify codegen so that we guarantee that `x.use` will do a copy if `X: Copy` is true after monomorphization. Right now the desugaring to `clone` occurs before monomorphization and hence it will call the `clone` method even for those instances where `X` is a `Copy` type. > * Convert `x.use` to a move rather than a clone if this is a last-use. > * Make `x` equivalent to `x.use` but with an (allow-by-default) lint to signal that something special is happened. > > > Notable decisions made and discussions: > > * Opted to name the trait that controls whether `x.use` does a clone or a move `UseCloned` rather than `Use`. This is because the trait does not control whether or not you can use something but rather controls what happens when you do. > * Question was raised on Zulip as to whether `x.use` should auto-deref. After thinking it over, reached the conclusion that it should not, because `x` and `x.use` should eventually behave the same modulo lints, but that (as ever) a `&T -> T` coercion would be useful for ergonomic reasons. > **Expose experimental LLVM features for GPU offloading** 1 detailed update available. Comment by @ZuseZ4 posted on 2025-03-25: > I just noticed that I missed my February update, so I'll keep this update a bit more high-level, to not make it too long. > > **Key developments:** > > 1. All key autodiff PRs got merged. So after building `rust-lang/rust` with the autodiff feature enabled, users can now use it, without the need for any custom fork. > 2. std::autodiff received the first PRs from new contributors, which have not been previously involved in rustc development! My plan is to grow a team to maintain this feature, so that's a great start. The PRs are here, here and here. Over time I hope to hand over increasingly larger issues. > 3. I received an offer to join the Rust compiler team, so now I can also officially review and approve PRs! For now I'll focus on reviewing PRs in the fields I'm most comfortable with, so autodiff, batching, and soon GPU offload. > 4. I implemented a standalone batching feature. It was a bit larger (~2k LoC) and needed some (back then unmerged) autodiff PRs, since they both use the same underlying Enzyme infrastructure. I therefore did not push for merging it. > 5. I recently implemented batching as part of the autodiff macro, for people who want to use both together. I subsequently split out a first set of code improvements and refactorings, which already got merged. The remaining autodiff feature PR is only 600 loc, so I'm currently cleaning it up for review. > 6. I spend time preparing an MCP to enable autodiff in CI (and therefore nightly). I also spend a lot of time discussing a potential MLIR backend for rustc. Please reach out if you want to be involved! > > > **Help wanted: ** We want to support autodiff in lib builds, instead of only binaries. oli-obk and I recently figured out the underlying bug, and I started with a PR in https://github.com/rust-lang/rust/pull/137570. The problem is that autodiff assumes fat-lto builds, but lib builds compile some of the library code using thin-lto, even if users specify `lto=fat` in their Cargo.toml. We'd want to move every thing to fat-lto if we enable Autodiff as a temporary solution, and later move towards embed-bc as a longer-term solution. If you have some time to help please reach out! Some of us have already looked into it a little but got side-tracked, so it's better to talk first about which code to re-use, rather than starting from scratch. > > I also booked my RustWeek ticket, so I'm happy to talk about all types of Scientific Computing, HPC, ML, or cursed Rust(c) and LLVM internals! Please feel free to dm me if you're also going and want to meet. **Extend pubgrub to match cargo 's dependency resolution** 1 detailed update available. Comment by @Eh2406 posted on 2025-03-14: > Progress continues to be stalled by high priority tasks for $DAY_JOB. It continues to be unclear when the demands of work will allow me to return focus to this project. **Externally Implementable Items** No detailed updates available. **Finish the libtest json output experiment** 1 detailed update available. Comment by @epage posted on 2025-03-17: > * Key developments: > * Between tasks on #92, I've started to refresh myself on the libtest-next code base > * Blockers: > * Help wanted: > **Implement Open API Namespace Support** No detailed updates available. **Implement restrictions, prepare for stabilization** No detailed updates available. **Improve state machine codegen** We've started work on implementing `#loop_match]` on this branch. For the time being integer and enum patterns are supported. The [benchmarks, are extremely encouraging, showing large improvements over the status quo, and significant improvements versus `-Cllvm-args=-enable-dfa-jump-thread`. Our next steps can be found in the todo file, and focus mostly on improving the code quality and robustness. 3 detailed updates available. Comment by @folkertdev posted on 2025-03-18: > @traviscross how would we make progress on that? So far we've mostly been talking to @joshtriplett, under the assumption that a `#[loop_match]` attribute on loops combined with a `#[const_continue]` attribute on "jumps to the next iteration" will be acceptable as a language experiment. > > Our current implementation handles the following > > > #![feature(loop_match)] enum State { A, B, } fn main() { let mut state = State::A; #[loop_match] 'outer: loop { state = 'blk: { match state { State::A => { #[const_continue] break 'blk State::B } State::B => break 'outer, } } } } > > Crucially, this does not add syntax, only the attributes and internal logic in MIR lowering for statically performing the pattern match to pick the right branch to jump to. > > The main challenge is then to implement this in the compiler itself, which we've been working on (I'll post our tl;dr update shortly) Comment by @folkertdev posted on 2025-03-18: > Some benchmarks (as of march 18th) > > A benchmark of https://github.com/bjorn3/comrak/blob/loop_match_attr/autolink_email.rs, basically a big state machine that is a perfect fit for loop match > > > Benchmark 1: ./autolink_email Time (mean ± σ): 1.126 s ± 0.012 s [User: 1.126 s, System: 0.000 s] Range (min … max): 1.105 s … 1.141 s 10 runs Benchmark 2: ./autolink_email_llvm_dfa Time (mean ± σ): 583.9 ms ± 6.9 ms [User: 581.8 ms, System: 2.0 ms] Range (min … max): 575.4 ms … 591.3 ms 10 runs Benchmark 3: ./autolink_email_loop_match Time (mean ± σ): 411.4 ms ± 8.8 ms [User: 410.1 ms, System: 1.3 ms] Range (min … max): 403.2 ms … 430.4 ms 10 runs Summary ./autolink_email_loop_match ran 1.42 ± 0.03 times faster than ./autolink_email_llvm_dfa 2.74 ± 0.07 times faster than ./autolink_email > > `#[loop_match]` beats the status quo, but also beats the llvm flag by a large margin. > > * * * > > A benchmark of zlib decompression with chunks of 16 bytes (this makes the impact of `loop_match` more visible) > > > Benchmark 1 (65 runs): target/release/examples/uncompress-baseline rs-chunked 4 measurement mean ± σ min … max outliers delta wall_time 77.7ms ± 3.04ms 74.6ms … 88.9ms 9 (14%) 0% peak_rss 24.1MB ± 64.6KB 24.0MB … 24.2MB 0 ( 0%) 0% cpu_cycles 303M ± 11.8M 293M … 348M 9 (14%) 0% instructions 833M ± 266 833M … 833M 0 ( 0%) 0% cache_references 3.62M ± 310K 3.19M … 4.93M 1 ( 2%) 0% cache_misses 209K ± 34.2K 143K … 325K 1 ( 2%) 0% branch_misses 4.09M ± 10.0K 4.08M … 4.13M 5 ( 8%) 0% Benchmark 2 (68 runs): target/release/examples/uncompress-llvm-dfa rs-chunked 4 measurement mean ± σ min … max outliers delta wall_time 74.0ms ± 3.24ms 70.6ms … 85.0ms 4 ( 6%) 🚀- 4.8% ± 1.4% peak_rss 24.1MB ± 27.1KB 24.0MB … 24.1MB 3 ( 4%) - 0.1% ± 0.1% cpu_cycles 287M ± 12.7M 277M … 330M 4 ( 6%) 🚀- 5.4% ± 1.4% instructions 797M ± 235 797M … 797M 0 ( 0%) 🚀- 4.3% ± 0.0% cache_references 3.56M ± 439K 3.08M … 5.93M 2 ( 3%) - 1.8% ± 3.6% cache_misses 144K ± 32.5K 83.7K … 249K 2 ( 3%) 🚀- 31.2% ± 5.4% branch_misses 4.09M ± 9.62K 4.07M … 4.12M 1 ( 1%) - 0.1% ± 0.1% Benchmark 3 (70 runs): target/release/examples/uncompress-loop-match rs-chunked 4 measurement mean ± σ min … max outliers delta wall_time 71.6ms ± 2.43ms 69.3ms … 78.8ms 6 ( 9%) 🚀- 7.8% ± 1.2% peak_rss 24.1MB ± 72.8KB 23.9MB … 24.2MB 20 (29%) - 0.0% ± 0.1% cpu_cycles 278M ± 9.59M 270M … 305M 7 (10%) 🚀- 8.5% ± 1.2% instructions 779M ± 277 779M … 779M 0 ( 0%) 🚀- 6.6% ± 0.0% cache_references 3.49M ± 270K 3.15M … 4.17M 4 ( 6%) 🚀- 3.8% ± 2.7% cache_misses 142K ± 25.6K 86.0K … 197K 0 ( 0%) 🚀- 32.0% ± 4.8% branch_misses 4.09M ± 7.83K 4.08M … 4.12M 1 ( 1%) + 0.0% ± 0.1% Benchmark 4 (69 runs): target/release/examples/uncompress-llvm-dfa-loop-match rs-chunked 4 measurement mean ± σ min … max outliers delta wall_time 72.8ms ± 2.57ms 69.7ms … 80.0ms 7 (10%) 🚀- 6.3% ± 1.2% peak_rss 24.1MB ± 35.1KB 23.9MB … 24.1MB 2 ( 3%) - 0.1% ± 0.1% cpu_cycles 281M ± 10.1M 269M … 312M 5 ( 7%) 🚀- 7.5% ± 1.2% instructions 778M ± 243 778M … 778M 0 ( 0%) 🚀- 6.7% ± 0.0% cache_references 3.45M ± 277K 2.95M … 4.14M 0 ( 0%) 🚀- 4.7% ± 2.7% cache_misses 176K ± 43.4K 106K … 301K 0 ( 0%) 🚀- 15.8% ± 6.3% branch_misses 4.16M ± 96.0K 4.08M … 4.37M 0 ( 0%) 💩+ 1.7% ± 0.6% > > The important points: `loop-match` is faster than `llfm-dfa`, and when combined performance is worse than when using `loop-match` on its own. Comment by @traviscross posted on 2025-03-18: > Thanks for that update. Have reached out separately. **Instrument the Rust standard library with safety contracts** 1 detailed update available. Comment by @celinval posted on 2025-03-17: > We have been able to merge the initial support for contracts in the Rust compiler under the `contracts` unstable feature. @tautschnig has created the first PR to incorporate contracts in the standard library and uncovered a few limitations that we've been working on. **Making compiletest more maintainable: reworking directive handling** 1 detailed update available. Comment by @jieyouxu posted on 2025-03-15: > Update (2025-03-15): > > * Doing a survey pass on compiletest to make sure I have the full picture. > **Metrics Initiative** 1 detailed update available. Comment by @yaahc posted on 2025-03-03: > After further review I've decided to limit scope initially and not get ahead of myself so I can make sure the schemas I'm working with can support the kind of queries and charts we're going to eventually want in the final version of the unstable feature usage metric. I'm hoping that by limiting scope I can have most of the items currently outlined in this project goal done ahead of schedule so I can move onto building the proper foundations based on the proof of concept and start to design more permanent components. As such I've opted for the following: > > * minimal change to the current JSON format I need, which is including the timestamp > * Gain clarity on exactly what questions I should be answering with the unstable feature usage metrics, the desired graphs and tables, and how this influences what information I need to gather and how to construct the appropriate queries within graphana > * gathering a sample dataset from docs.rs rather than viewing it as the long term integration, since there are definitely some sampleset bias issues in that dataset from initial conversations with docs.rs > * Figure out proper hash/id to use in the metrics file names to avoid collisions with different conditional compilation variants of the same crate with different feature enabled. > > > For the second item above I need to have more detailed conversations with both @rust-lang/libs-api and @rust-lang/lang **Model coherence in a-mir-formality** 1 detailed update available. Comment by @nikomatsakis posted on 2025-03-17: > Update: > > @tiif has been working on integrating const-generic effects into a-mir-formality and making good progress. > > I have begun exploring integration of the MiniRust definition of MIR. This doesn't directly work towards the goal of modeling coherence but it will be needed for const generic work to be effective. > > I am considering some simplification and cleanup work as well. **Next-generation trait solver** 1 detailed update available. Comment by @lcnr posted on 2025-03-17: > The two cycle handling PRs mentioned in the previous update have been merged, allowing `nalgebra` to compile with the new solver enabled. I have now started to work on opaque types in borrowck again. This is a quite involved issue and will likely take a few more weeks until it's fully implemented. **Nightly support for ergonomic SIMD multiversioning** 1 detailed update available. Comment by @veluca93 posted on 2025-03-17: > Key developments: Started investigating how the proposed SIMD multiversioning options might fit in the context of the efforts for formalizing a Rust effect system **Null and enum-discriminant runtime checks in debug builds** No detailed updates available. **Optimizing Clippy & linting** 1 detailed update available. Comment by @blyxyas posted on 2025-03-17: > Monthly update! > > * https://github.com/rust-lang/rust-clippy/issues/13821 has been merged. This has successfully optimized the MSRV extraction from the source code. > > > On the old MSRV extraction,`Symbol::intern` use was sky high being about 3.5 times higher than the rest of the compilation combined. Now, it's at normal levels. Note that `Symbol::intern` is a very expensive and locking function, so this is very notable. Thanks to @Alexendoo for this incredible work! > > As a general note on the month, I'd say that we've experimented a lot. > > * Starting efforts on parallelizing the lint system. > * https://github.com/rust-lang/rust-clippy/issues/14423 Started taking a deeper look into our dependence on `libLLVM.so` and heavy relocation problems. > * I took a look into heap allocation optimization, seems that we are fine. For the moment, rust-clippy#14423 is the priority. > **Prepare const traits for stabilization** 1 detailed update available. Comment by @oli-obk posted on 2025-03-20: > I opened an RFC (https://github.com/rust-lang/rfcs/pull/3762) and we had a lang team meeting about it. Some design exploration and bikeshedding later we have settled on using (const)instead of ~const along with some more annotations for explicitness and some fewer annotations in other places. The RFC has been updated accordingly. There is still ongoing discussions about reintroducing the "fewer annotations" for redundancy and easier processing by humans. **Prototype a new set of Cargo "plumbing" commands** No detailed updates available. **Publish first rust-lang-owned release of "FLS"** 2 detailed updates available. Comment by @JoelMarcey posted on 2025-03-14: > Key Developments: Working on a public announcement of Ferrous' contribution of the FLS. Goal is to have that released soon. Also working out the technical details of the contribution, particularly around how to initially integrate the FLS into the Project itself. > > Blockers: None yet. Comment by @JoelMarcey posted on 2025-04-01: > Key Developments: Public announcement of the FLS donation to the Rust Project. > > Blockers: None **Publish first version of StableMIR on crates.io** 2 detailed updates available. Comment by @celinval posted on 2025-03-20: > We have proposed a project idea to Google Summer of Code to implement the refactoring and infrastructure improvements needed for this project. I'm working on breaking down the work into smaller tasks so they can be implemented incrementally. Comment by @celinval posted on 2025-03-20: > I am also happy to share that @makai410 is joining us in this effort! 🥳 **Research: How to achieve safety when linking separately compiled code** No detailed updates available. **Run the 2025H1 project goal program** 2 detailed updates available. Comment by @nikomatsakis posted on 2025-03-03: > Update: February goal update has been posted. We made significant revisions to the way that goal updates are prepared. If you are a goal owner, it's worth reading the directions for how to report your status, especially the part about help wanted and summary comments. Comment by @nikomatsakis posted on 2025-03-17: > Update: We sent out the first round of pings for the March update. The plan is to create the document on **March 25th** , so @rust-lang/goal-owners please get your updates in by then. Note that you can create a TL;DR comment if you want to add 2-3 bullet points that will be embedded directly into the final blog post. > > In terms of goal planning: > > * @nandsh is planning to do a detailed retrospective on the goals program in conjunction with her research at CMU. Please reach out to her on Zulip (**Nandini**) if you are interested in participating. > * We are planning to overhaul the ping process as described in this hackmd. In short, pings will come on the 2nd/3rd Monday of the month. No pings will be sent if you've posted a comment that month. The blog post will be prepared on the 3rd Friday. > * We've been discussing how to structure 2025H2 goals and are thinking of making a few changes. We'll break out three categories of goals (Flagship / Core / Stretch), with "Core" goals being those deemed most important. We'll also have a 'pre-read' before the RFC opens with team leads to look for cross-team collaborative opportunities. At least that's the _current_ plan. > **Rust Vision Document** * We drafted a Rust Vision Doc Action Plan. * We expect to publish our announcement blog post by end of Month including a survey requesting volunteers to speak with us. We are also creating plans for interviews with company contacts, global community groups, and Rust maintainers. 1 detailed update available. Comment by @nikomatsakis posted on 2025-03-17: > Update: > > I've asked @jackh726 to co-lead the team with me. Together we pulled together a Rust Vision Doc action plan. > > The plan begins by posting a blog post (draft available here) announcing the effort. We are coordinating with the Foundation to create a survey which will be linked from the blog post. The survey questions ask about user's experience but also look for volunteers we can speak with. > > We are pulling together the team that will perform the interviewing. We've been in touch with UX reseearchers who will brief us on some of the basics of UX research. We're finalizing team membership now plus the set of focus areas, we expect to cover at least users/companies, Rust project maintainers, and Rust global communities. See the Rust Vision Doc action plan for more details. **rustc-perf improvements** 1 detailed update available. Comment by @davidtwco posted on 2025-03-03: > A small update, @Jamesbarford aligned with @kobzol on a high-level architecture and will begin fleshing out the details and making some small patches to rustc-perf to gain familiarity with the codebase. **Scalable Polonius support on nightly** 1 detailed update available. Comment by @lqd posted on 2025-03-24: > Here are the key developments for this update. > > Amanda has continued on the placeholder removal task. In particular on the remaining issues with rewritten type tests. The in-progress work caused incorrect errors to be emitted under the rewrite scheme, and a new strategy to handle these was discussed. This has been implemented in the PR, and seems to work as hoped. So the PR should now be in a state that is ready for more in-depth review pass, and should hopefully land soon. > > Tage has started his master's thesis with a focus on the earliest parts of the borrow checking process, in order to experiment with graded borrow-checking, incrementalism, avoiding work that's not needed for loans that are not invalidated, and so on. A lot of great progress has been made on these parts already, and more are being discussed even in the later areas (live and active loans). > > I have focused on taking care of the remaining diagnostics and test failures of the location-sensitive analysis. For diagnostics in particular, the PRs mentioned in the previous updates have landed, and I've fixed a handful of NLL spans, all the remaining differences under the compare-mode, and blessed differences that were improvements. For the test failures, handling liveness differently in traversal fixed most of the remaining failures, while a couple are due to the friction with mid-points avoidance scheme. For these, we have a few different paths forward, but with different trade-offs and we'll be discussing and evaluation these in the very near future. Another two are still left to analyze in-depth to see what's going on. > > Our near future focus will be to continue down the path to correctness while also expanding test coverage that feels lacking in certain very niche areas, and that we want to improve. At the same time, we'll also work on a figuring out a better architecture to streamline the entire end-to-end process, to allow early outs, avoid work that is not needed, etc. **Secure quorum-based cryptographic verification and mirroring for crates.io** No detailed updates available. **Stabilize cargo-script** 1 detailed update available. Comment by @lqd posted on 2025-03-26: > This project goal was actually carried over from 2024h2, in https://github.com/rust-lang/rust-project-goals/pull/294 **SVE and SME on AArch64** 2 detailed updates available. Comment by @davidtwco posted on 2025-03-03: > A small update, we've opened a draft PR for the initial implementation of this - rust-lang/rust#137944. Otherwise, just continued to address feedback on the RFCs. Comment by @davidtwco posted on 2025-03-18: > * We've been resolving review feedback on the implementation of the Sized Hierarchy RFC on rust-lang/rust#137944. We're also working on reducing the performance regression in the PR, by avoiding unnecessary elaboration of sizedness supertraits and extending the existing `Sized` case in `type_op_prove_predicate` query's fast path. > * There's not been any changes to the RFC, there's minor feedback that has yet to be responded to, but it's otherwise just waiting on t-lang. > * We've been experimenting with rebasing rust-lang/rust#118917 on top of rust-lang/rust#137944 to confirm that const sizedness allows us to remove the type system exceptions that the SVE implementation previously relied on. We're happy to confirm that it does. > **Unsafe Fields** No detailed updates available. **Use annotate-snippets for rustc diagnostic output** 1 detailed update available. Comment by @Muscraft posted on 2025-03-31: > While my time was limited these past few months, lots of progress was made! I was able to align `annotate-snippets` internals with `rustc`'s `HumanEmitter` and get the new API implemented. These changes have not been merged yet, but they can be found here. As part of this work, I got `rustc` using `annotate-snippets` as its only renderer. During all of this, I started working on making `rustc` use `annotate-snippets` as its only renderer, which turned out to be a huge benefit. I was able to get a feel for the new API while addressing rendering divergences. As of the time of writing, all but ~30 tests of the roughly 18,000 UI tests are passing. > > > test result: FAILED. 18432 passed; 29 failed; 193 ignored; 0 measured; 0 filtered out; finished in 102.32s > > Most of the failing tests are caused by a few things: > > * `annotate-snippets` right aligns numbers, whereas `rustc` left aligns > * `annotate-snippets` doesn't handle multiple suggestions for the same span very well > * Problems with handling `FailureNote` > * `annotate-snippets` doesn't currently support colored labels and titles, i.e., the magenta highlight `rustc` uses > * `rustc` wants to pass titles similar to `error: internal compiler error[E0080]`, but `annotate-snippets` doesn't support that well > * differences in how `rustc` and `annotate-snippets` handle term width during tests > * When testing, `rustc` uses `DEFAULT_COLUMN_WIDTH` and does not subtract the code offset, while `annotate-snippets` does > * Slight differences in how "newline"/end of line highlighting is handled > * JSON output rendering contains color escapes >
blog.rust-lang.org
April 17, 2025 at 10:12 PM