Ferrocene 24.05.0¶
Ferrocene 24.05.0 is the second major release of Ferrocene.
The highlights of this release are the inclusion of Rust 1.76.0, the qualified x86-64 Linux (glibc) target, new experimental targets, and the use of a bundled linker.
New features¶
The Rust version has been updated to 1.76.0.
The x86-64 Linux (glibc) target is now supported and qualified for safety critical use, in addition to being used as a host platform like in previous releases.
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:
Armv7E-M bare-metal (soft-float) (
thumbv7em-none-eabi
)Armv7E-M bare-metal (hard-float) (
thumbv7em-none-eabihf
)WASM bare-metal (
wasm32-unknown-unknown
)
The self-testing tool now checks the correct behavior of linker drivers, according to the new requirements for linkers. Note that the self-testing tool is not qualified for safety critical use yet.
These tools from upstream toolchain are now distributed with Ferrocene:
clippy
rustfmt
rust-analyzer
rust-demangler
Changes¶
Ferrocene now uses a bundled copy of LLD as the linker, and allows any external linker or C compiler to be used as the linker driver as long as it adheres to the behavior specified in the Safety Manual. The purpose of the linker driver is to locate the system libraries needed for the linkage, and instructing LLD on where to find them.
Breaking changes¶
The
--crate-type dylib
,--crate-type cdylib
and--crate-type proc-macro
CLI flags are not qualified for safety critical use anymore. Safety critical support for them will be added back in a future release.
Bug fixes¶
Disabled LLVM optimization that optimizes lifetime zones that are broken to mitigate KP-R112213.
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.69.0¶
Language¶
Compiler¶
Libraries¶
Stabilized APIs¶
These APIs are now stable in const contexts:
Cargo¶
Rustdoc¶
Compatibility Notes¶
The
rust-analysis
component fromrustup
now only contains a warning placeholder. This was primarily intended for RLS, and the corresponding-Zsave-analysis
flag has been removed from the compiler as well.Unaligned references to packed fields are now a hard error. This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
Cargo now emits errors on invalid characters in a registry token.
The Rust distribution no longer always includes rustdoc If
tools = [...]
is set in config.toml, we will respect a missing rustdoc in that list. By default rustdoc remains included. To retain the prior behavior explicitly add"rustdoc"
to the list.
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.70.0¶
Language¶
Compiler¶
Extend -Cdebuginfo with new options and named aliases This provides a smaller version of debuginfo for cases that only need line number information (
-Cdebuginfo=line-tables-only
), which may eventually become the default for-Cdebuginfo=1
.Switch to LLD as default linker for {arm,thumb}v4t-none-eabi
Add tier 3 target for
i586-pc-nto-qnx700
(QNX Neutrino RTOS, version 7.0),Insert alignment checks for pointer dereferences as debug assertions This catches undefined behavior at runtime, and may cause existing code to fail.
Refer to Rust’s platform support page for more information on Rust’s tiered platform support.
Libraries¶
Flatten/inline format_args!() and (string and int) literal arguments into format_args!()
Add a builtin unstable
FnPtr
trait that is implemented for all function pointers This extendsDebug
,Pointer
,Hash
,PartialEq
,Eq
,PartialOrd
, andOrd
implementations for function pointers with all ABIs.
Stabilized APIs¶
Cargo¶
Misc¶
Compatibility Notes¶
Perform const and unsafe checking for expressions in
let _ = expr
position.WebAssembly targets enable
sign-ext
andmutable-globals
features in codegen This may cause incompatibility with older execution environments.Insert alignment checks for pointer dereferences as debug assertions This catches undefined behavior at runtime, and may cause existing code to fail.
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.71.0¶
Language¶
Compiler¶
Evaluate place expression in
PlaceMention
, makinglet _ =
patterns more consistent with respect to the borrow checker.Stabilize
extern "C-unwind"
and friends. The existingextern "C"
etc. may change behavior for cross-language unwinding in a future release.Update the version of musl used on
*-linux-musl
targets to 1.2.3, enabling time64 on 32-bit systems.Stabilize
debugger_visualizer
for embedding metadata like Microsoft’s Natvis.Improve niche placement by trying two strategies and picking the better result.
Promote
loongarch64-unknown-linux-gnu
to Tier 2 with host tools.
Refer to Rust’s platform support page for more information on Rust’s tiered platform support.
Libraries¶
Rework handling of recursive panics. Additional panics are allowed while unwinding, as long as they are caught before escaping a
Drop
implementation, but panicking within a panic hook is now an immediate abort.Remove unnecessary
T: Send
bound inError for mpsc::SendError<T>
andTrySendError<T>
.Fix docs for
alloc::realloc
to matchLayout
requirements that the size must not exceedisize::MAX
.Document
const {}
syntax forstd::thread_local
. This syntax was stabilized in Rust 1.59, but not previously mentioned in release notes.
Stabilized APIs¶
From<[T; N]> for (T...)
(array to N-tuple for N in 1..=12)From<(T...)> for [T; N]
(N-tuple to array for N in 1..=12)
These APIs are now stable in const contexts:
Cargo¶
Rustdoc¶
Misc¶
Compatibility Notes¶
Remove structural match from
TypeId
. Code that uses a constantTypeId
in a pattern will potentially be broken. Known cases have already been fixed – in particular, users of thelog
crate’skv_unstable
feature should update tolog v0.4.18
or later.Add a
sysroot
crate to represent the standard library crates. This does not affect stable users, but may require adjustment in tools that build their own standard library.Cargo optimizes its usage under
rustup
. When Cargo detects it will runrustc
pointing to a rustup proxy, it’ll try bypassing the proxy and use the underlying binary directly. There are assumptions around the interaction with rustup andRUSTUP_TOOLCHAIN
. However, it’s not expected to affect normal users.When querying a package, Cargo tries only the original name, all hyphens, and all underscores to handle misspellings. Previously, Cargo tried each combination of hyphens and underscores, causing excessive requests to crates.io.
Cargo now disallows
RUSTUP_HOME
andRUSTUP_TOOLCHAIN
in the[env]
configuration table. This is considered to be not a use case Cargo would like to support, since it will likely cause problems or lead to confusion.
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.71.1¶
Rust 1.72.0¶
Language¶
Replace const eval limit by a lint and add an exponential backoff warning
Uplift
clippy::invalid_utf8_in_unchecked
lint asinvalid_from_utf8_unchecked
andinvalid_from_utf8
Uplift
clippy::cast_ref_to_mut
lint asinvalid_reference_casting
Uplift
clippy::cmp_nan
lint asinvalid_nan_comparisons
Don’t require associated types with Self: Sized bounds in
dyn Trait
objects
Compiler¶
Remember names of
cfg
-ed out items to mention them in diagnosticsForce all native libraries to be statically linked when linking a static binary
Refer to Rust’s platform support page for more information on Rust’s tiered platform support.
Libraries¶
Rustdoc¶
Stabilized APIs¶
These APIs are now stable in const contexts:
Cargo¶
Compatibility Notes¶
Cargo changed feature name validation check to a hard error. The warning was added in Rust 1.49. These extended characters aren’t allowed on crates.io, so this should only impact users of other registries, or people who don’t publish to a registry. #12291
Demoted
mips*-unknown-linux-gnu*
targets from host tier 2 to target tier 3 support.
Rust 1.72.1¶
Resolve some ICE regressions in the compiler:
Rust 1.73.0¶
Language¶
Compiler¶
Write version information in a
.comment
section like GCC/Clang.Infer type in irrefutable slice patterns with fixed length as array.
Add several 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¶
Misc¶
Compatibility Notes¶
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.74.0¶
Language¶
Compiler¶
Libraries¶
Stabilized APIs¶
impl From<OwnedHandle> for std::process::Child{Stdin, Stdout, Stderr}
impl From<OwnedFd> for std::process::Child{Stdin, Stdout, Stderr}
These APIs are now stable in const contexts:
Cargo¶
Rustdoc¶
Compatibility Notes¶
Don’t resolve generic impls that may be shadowed by dyn built-in impls
The new
impl From<{&,&mut} [T; N]> for Vec<T>
is known to cause some inference failures with overly-generic code. In those examples using thetui
crate, the combination ofAsRef<_>
andInto<Vec>
leaves the middle type ambiguous, and the newimpl
adds another possibility, so it now requires an explicit type annotation.
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.
None this cycle.
Rust 1.74.1¶
Rust 1.75.0¶
Language¶
Compiler¶
Rework negative coherence to properly consider impls that only partly overlap.
Bump
COINDUCTIVE_OVERLAP_IN_COHERENCE
to deny, and warn in dependencies.Add the V (vector) extension to the
riscv64-linux-android
target spec.Automatically enable cross-crate inlining for small functions
Add several 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¶
Compatibility Notes¶
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.76.0¶
Language¶
Compiler¶
Lint pinned
#[must_use]
pointers (in particular,Box<T>
whereT
is#[must_use]
) inunused_must_use
.Soundness fix: fix computing the offset of an unsized field in a packed struct
Soundness fix: fix dynamic size/align computation logic for packed types with dyn Trait tail
Add
$message_type
field to distinguish json diagnostic outputs
Refer to Rust’s platform support page for more information on Rust’s tiered platform support.
Libraries¶
Stabilized APIs¶
std::hash::{DefaultHasher, RandomState}
These were previously available only throughstd::collections::hash_map
.
Cargo¶
See Cargo release notes.
Rustdoc¶
Compatibility Notes¶
Add allow-by-default lint for unit bindings This is expected to be upgraded to a warning by default in a future Rust release. Some macros emit bindings with type
()
with user-provided spans, which means that this lint will warn for user code.Report errors in jobserver inherited through environment variables This may warn on benign problems too.
Improve
print_tts
This change can break some naive manual parsing of token trees in proc macro code which expect a particular structure after.to_string()
, rather than just arbitrary Rust code.Make
IMPLIED_BOUNDS_ENTAILMENT
into a hard error from a lintVec’s allocation behavior was changed when collecting some iterators Allocation behavior is currently not specified, nevertheless changes can be surprising. See
impl FromIterator for Vec
for more details.