Ferrocene 26.11.0

New features

  • Ferrocene is now certified for railway usage, under the EN 50716 standard

  • The certified library subset has been expanded to include a subset of alloc, allowing the use of dynamic memory allocation in certified applications. Users must bring their own certified allocator, and only the basic alloc, realloc and dealloc functions are supported in this release.

  • The [ferrocene::prevalidated] attribute can now be applied to modules, traits, and impl blocks. This marks all contained functions as validated, avoiding the need to annotate each function individually.

  • Added a new [ferrocene::requires_validation] attribute, which can be applied to trait methods to require all implementations to be validated.

  • Added 2 functions to the certified subset:

    • slice::as_chunks_mut

    • slice::as_chunks_unchecked_mut

  • Two new targets are now supported and qualified for safety critical use:

    • Armv8-M Mainline bare-metal (soft-float) (thumbv8m.main-none-eabi)

    • Armv8-M Mainline bare-metal (hard-float) (thumbv8m.main-none-eabihf)

Changes

  • Documentation now includes docs for the crates which make up rustc itself, including documentation on the ferrocene::prevalidated lint (as rustc_lint::ferrocene).

  • Documentation for the certified subset of core has been folded into the standard library documentation. Now Ferrocene provides a single, complete copy of the Rust standard library documentation, with certified functions labelled inline.

  • Atomic::<T>::fetch_update has been renamed to Atomic::<T>::try_update by upstream Rust, with the old name being deprecated as of Rust 1.99.0. Accordingly, fetch_update has been removed from the certified subset. There is no semantic change, so users can simply replace any calls to fetch_update with try_update.

Bug fixes

  • Fixed a diagnostics issue where calls to private, non-generic functions within libraries were not checked by the early (pre-monomorphization) pass of the [ferrocene::unvalidated] lint while compiling the library itself.

    This was not a safety issue; any diagnostics were simply delayed until compiling an application which (transitively) depends on the library in question, at which point the calls would be checked by the late (post-monomorphization) lint pass.

  • Raise errors in two situations which could potentially lead to a non-qualified compiler configuration:

    • Attempting to use any code generation backend other than LLVM; only the LLVM backend is qualified for use with Ferrocene

    • Using an external linker which does not support the -fuse-ld=... flag; previously this flag was silently dropped if the linker did not support it.

Fixed known problems

A list of fixed known problems in this release can be found on the Ferrocene 26.11 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.98.0

Language

Platform Support

Refer to Rust’s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Compatibility Notes

Rust 1.98.1

Rust 1.99.0

Language

Compiler

Platform Support

Refer to Rust’s platform support page for more information on Rust’s tiered platform support.

Libraries

Stabilized APIs

Cargo

  • Add a new built-in profile debug. This is a preparation for transitioning the dev profile away from debugging to give a saner default for faster development iterations. Currently there is no difference between dev and debug profiles. docs #17214

  • Workspace members on edition 2024 or later can now override an inherited workspace dependency’s default-features field. For example, serde = { workspace = true, default-features = false } now turns off default features even when the workspace definition enables them. On earlier editions, default-features = false is ignored with a warning. (RFC 3945) #17126

See also the full Cargo changelog

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.99.1