Ferrocene 25.02.0¶
Ferrocene 25.02.0 is the fifth major release of Ferrocene.
The highlights of this release are the inclusion of Rust 1.83.0, as well as several new experimental targets and a new Quality Managed target.
New features¶
Updated the Rust version to include changes in Rust 1.82.0 and 1.83.0.
Quality Managed support has been added for a new target. Quality Managed targets are not qualified for safety critical use, but are otherwise fully tested and supported. The new target is:
Apple Silicon macOS (
aarch64-apple-darwin
)
New experimental features¶
Experimental features are not qualified for safety critical use, and are shipped as a preview.
Experimental support has been added for multiple cross-compilation targets. Note that experimental targets are not qualified for safety critical use. The new targets are:
Armv6-M bare-metal (
thumbv6m-none-eabi
)Armv8-M Baseline bare-metal (
thumbv8m.base-none-eabi
)Armv8-M Mainline (soft-float) (
thumbv8m.main-none-eabi
)Armv8-M Mainline (hard-float) (
thumbv8m.main-none-eabihf
)RV64GC Linux (glibc) (
riscv64gc-unknown-linux-gnu
)
Fixed known problems¶
A list of fixed known problems in this release can be found on the Ferrocene 25.02 Known Problems page.
Rust changes¶
This release includes the following changes introduced by the upstream Rust project. Note that this changelog is maintained by upstream. The target support changes described here describe Rust’s support levels, and have no correlation to the targets and platforms supported by Ferrocene.
Rust 1.82.0¶
Language¶
Don’t make statement nonterminals match pattern nonterminals
Patterns matching empty types can now be omitted in common cases
Enforce supertrait outlives obligations when using trait impls
Reorder trait bound modifiers after
for<...>
binder in trait boundsStabilize
+ use<'lt>
opaque type precise capturing (RFC 3617)
Compiler¶
Libraries¶
Stabilized APIs¶
These APIs are now stable in const contexts:
Cargo¶
Compatibility Notes¶
We now disallow setting some built-in cfgs via the command-line with the newly added
explicit_builtin_cfgs_in_flags
lint in order to prevent incoherent state, eg.windows
cfg active but target is Linux based. The appropriaterustc
flag should be used instead.The standard library has a new implementation of
binary_search
which is significantly improves performance (#128254). However when a sorted slice has multiple values which compare equal, the new implementation may select a different value among the equal ones than the old implementation.illumos/Solaris now sets
MSG_NOSIGNAL
when writing to sockets. This avoids killing the process with SIGPIPE when writing to a closed socket, which matches the existing behavior on other UNIX targets.The WebAssembly target features
multivalue
andreference-types
are now both enabled by default. These two features both have subtle changes implied for generated WebAssembly binaries. For themultivalue
feature, WebAssembly target support has changed when upgrading to LLVM 19. Support for generating functions with multiple returns no longer works and-Ctarget-feature=+multivalue
has a different meaning than it did in LLVM 18 and prior. There is no longer any supported means to generate a module that has a function with multiple returns in WebAssembly from Rust source code. For thereference-types
feature the encoding of immediates in thecall_indirect
, a commonly used instruction by the WebAssembly backend, has changed. Validators and parsers which don’t understand thereference-types
proposal will no longer accept modules produced by LLVM due to this change in encoding of immediates. Additionally these features being enabled are encoded in thetarget_features
custom section and may affect downstream tooling such aswasm-opt
consuming the module. Generating a WebAssembly module that disables default features requires-Zbuild-std
support from Cargo and more information can be found at rust-lang/rust#128511.Rust now raises unsafety errors for union patterns in parameter-position
Internal Changes¶
These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.
Rust 1.83.0¶
Language¶
Compiler¶
Add many new tier 3 targets:
Refer to Rust’s platform support page for more information on Rust’s tiered platform support.
Libraries¶
Stabilized APIs¶
These APIs are now stable in const contexts:
Cargo¶
Rustdoc¶
The sidebar / hamburger menu table of contents now includes the
# headers
from the main item’s doc comment. This is similar to a third-party feature provided by the rustdoc-search-enhancements browser extension.
Compatibility Notes¶
Warn against function pointers using unsupported ABI strings.
Check well-formedness of the source type’s signature in fn pointer casts. This partly closes a soundness hole that comes when casting a function item to function pointer
Use equality instead of subtyping when resolving type dependent paths.
Linking on macOS now correctly includes Rust’s default deployment target. Due to a linker bug, you might have to pass
MACOSX_DEPLOYMENT_TARGET
or fix your#[link]
attributes to point to the correct frameworks. See https://github.com/rust-lang/rust/pull/129369.The future incompatibility lint
deprecated_cfg_attr_crate_type_name
has been made into a hard error. It was used to deny usage of#![crate_type]
and#![crate_name]
attributes in#![cfg_attr]
, which required a hack in the compiler to be able to change the used crate type and crate name after cfg expansion. Users can use--crate-type
instead of#![cfg_attr(..., crate_type = "...")]
and--crate-name
instead of#![cfg_attr(..., crate_name = "...")]
when runningrustc
/cargo rustc
on the command line. Use of those two attributes outside of#![cfg_attr]
continue to be fully supported.Until now, paths into the sysroot were always prefixed with
/rustc/$hash
in diagnostics, codegen, backtrace, e.g.thread 'main' panicked at 'hello world', map-panic.rs:2:50 stack backtrace: 0: std::panicking::begin_panic at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:616:12 1: map_panic::main::{{closure}} at ./map-panic.rs:2:50 2: core::option::Option<T>::map at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:929:29 3: map_panic::main at ./map-panic.rs:2:30 4: core::ops::function::FnOnce::call_once at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
We want to change this behaviour such that, when
rust-src
source files can be discovered, the virtual path is discarded and therefore the local path will be embedded, unless there is a--remap-path-prefix
that causes this local path to be remapped in the usual way.#129687 implements this behaviour, when
rust-src
is present at compile time,rustc
replaces/rustc/$hash
with a real path into the localrust-src
component with best effort. To sanitize this, users must explicitly supply--remap-path-prefix=<path to rust-src>=foo
or not have therust-src
component installed.The allow-by-default
missing_docs
lint used to disable itself when invoked throughrustc --test
/cargo test
, resulting in#[expect(missing_docs)]
emitting false positives due to the expectation being wrongly unfulfilled. This behavior has now been removed, which allows#[expect(missing_docs)]
to be fulfilled in all scenarios, but will also report newmissing_docs
diagnostics for publicly reachable#[cfg(test)]
items, integration test crate-level documentation, and publicly reachable items in integration tests.The
armv8r-none-eabihf
target now uses the Armv8-R required set of floating-point features.The sysroot no longer contains the
std
dynamic library in its top-levellib/
dir.