Source code of Ferrocene, safety-critical Rust toolchain

Overview

Ferrocene Logo: A circle between two planes, representing the chemical compound of the name Ferrocene, with the name written next to it.


Ferrocene is a toolchain to enable the use of the Rust programming language in safety-critical environments. It is a proper downstream of the main Rust compiler - rustc, maintained by the Rust project on rust-lang/rust.

The mission of Ferrocene is to bring open source practices to safety-critical industries and improve the Rust open source ecosystem through safety-critical practices.

Ferrocene is maintained and supported by the world-renowed experts at Ferrous Systems. Both standard and long-term support are available. Check our website for details.

Current status

Ferrocene is currently in the final stages of qualification for ISO 26262 ASIL-D and IEC 61508 SiL4. Qualification for other standards and areas, such as railway and aerospace, are planned.

Installation

Prebuilt Ferrocene binaries are available for customers and partners. You can visit releases.ferrocene.dev to download the release archives after logging in with your Ferrocene account.

Documentation and Procedures

The documentation of the Ferrocene toolchain and its source can be found in the ferrocene/doc directory. The documentation contains the projects procedures, its quality management measures and current testing coverage.

Rendered versions of the documentation are also available:

Support

Multiple levels of support are available for paying customers, provided by Ferrous Systems. You can log into customers.ferrocene.dev to learn about your support plan, and how to send support requests.

Contribution policy

As a downstream of the Rust project, Ferrocene prefers to keep the compiler unmodified. This means that general, contributions to the compiler or its tools and discussions should be kept to rust-lang/rust. However, Ferrocene does serve as a community of peers to propose and produce changes useful in safety-critical changes towards the project.

Contributions to qualification activities and manuals are welcome, but generally gated. Contribution is open to industry and academic partners, customers and project employees.

You can use the Ferrocene issue tracker to file an issue for the materials provided by the Ferrocene developers. Please note that the issue tracker is not a support channel.

Please note that Ferrocene is governed under the Apache-2.0 license and contribution policies apply to the issue tracker as well as the codebase itself.

Additional services

Ferrous Systems provides services built and tailored around Ferrocene:

  • Trainings: trainings on Rust and Ferrocene, particularly for teams, are available. Trainings can be custom tailored to your needs. Check out our training offerings.

  • Inclusion in SDKs: Ferrocene is available to be integrated in your toolchain! Please get in touch to learn more.

  • Tailoring, enabling and integration within your system: We're more than happy to enable Rust support in your operating system or tool, including porting the Rust compiler to the targets you need and qualifying them in Ferrocene. Get in touch to learn more.

  • Infrastructure support: Ferrocene is built for a DevOps world. Rust for your builds in the cloud is a first-class citizen for us, and we can provide support tailored to you. Get in touch for more information.

Security

Please follow Ferrocene's security policy if you discover a security vulnerability affecting Ferrocene.

License and trademark

The contents of the repository are primarily licensed under either the MIT or Apache 2.0 license: users can choose either license, and contributors must license their changes under both licenses. Note that the repository contains files authored by third parties and published under different licenses, see the annotations next to those files.

Ferrocene is a registered trademark of Critical Section GmbH, a subsidiary of Ferrous Systems. See our trademark policy for the guidelines on the use of the trademark.

Comments
  • Allow releases of commits not present in this repository

    Allow releases of commits not present in this repository

    Right now, the source code of Ferrocene 23.06.0 still lives in a private repository, while the release process runs in ferrocene/ferrocene. Until we open source 23.06.1, we need a way to publish releases for 23.06.0.

    The release tooling is able to publish releases for 23.06.0 from the public repository (if the full commit hash is provided), but the resolution of the git ref into a commit hash would fail.

    This adds a new option to skip resolving the git ref when starting a manual release.

    backport:maybe 
    opened by pietroalbini 2
  • Fix failure to create pull requests in pull-subtrees

    Fix failure to create pull requests in pull-subtrees

    When no previous commit created by the automation was found, and the subtree pull didn't result in any change, the automation would fail as it'd try to create a GitHub PR without any diff. This changes the automation to detect whether a subtree pull was actually committed.

    backport:maybe 
    opened by pietroalbini 1
  • Fix subtree pulling automation

    Fix subtree pulling automation

    This was yet another automation broken by the squash. This PR:

    • Removes pulls from the 1.68 branch, as it doesn't contain any subtree that need pulling anymore.
    • Fixes the automation crashing when the initial pull wasn't done by the automation.
    backport:maybe 
    opened by pietroalbini 1
  • Fix the release scheduler failing when no rolling releases are present

    Fix the release scheduler failing when no rolling releases are present

    Before this commit, if no rolling releases were present (due to the lack of a release/1.NN branch with stable in src/ci/channel), the script calculating the releases to publish would crash. This happened after the squashing of all the history.

    The problem can be seen in https://github.com/ferrocene/ferrocene/actions/runs/6399720087/job/17372224848, and it appeared only after the squash (as we didn't squash the release branches yet).

    backport:maybe 
    opened by pietroalbini 1
  • Fix divergence from upstream `master`

    Fix divergence from upstream `master`

    • rust-lang/rust#116483
      • rust-lang/rust#116475
      • rust-lang/rust#116329
      • rust-lang/rust#116198
      • rust-lang/rust#115588
      • rust-lang/rust#115522
      • rust-lang/rust#115454
    • rust-lang/rust#111595
    • rust-lang/rust#116018
    • rust-lang/rust#116472
      • rust-lang/rust#116469
      • rust-lang/rust#116421
    • rust-lang/rust#116463
    • rust-lang/rust#101150
    • rust-lang/rust#116269
    • rust-lang/rust#116417
    • rust-lang/rust#116455
      • rust-lang/rust#116452
      • rust-lang/rust#116428
      • rust-lang/rust#116415
      • rust-lang/rust#116288
      • rust-lang/rust#116220
    • rust-lang/rust#103046
    • rust-lang/rust#114042
    • rust-lang/rust#104153
    • rust-lang/rust#116427
    • rust-lang/rust#116443
      • rust-lang/rust#116432
      • rust-lang/rust#116431
      • rust-lang/rust#116429
      • rust-lang/rust#116296
      • rust-lang/rust#116223
    • rust-lang/rust#116273
    • rust-lang/rust#116184
    • rust-lang/rust#116370
    • rust-lang/rust#114417
    • rust-lang/rust#115200
    • rust-lang/rust#116413
    • rust-lang/rust#116381
    • rust-lang/rust#116360
    • rust-lang/rust#116353
    • rust-lang/rust#116406
    • rust-lang/rust#116408
      • rust-lang/rust#116395
      • rust-lang/rust#116393
      • rust-lang/rust#116388
      • rust-lang/rust#116365
      • rust-lang/rust#116363
      • rust-lang/rust#116146
      • rust-lang/rust#115961
    • rust-lang/rust#116386
    • rust-lang/rust#116367
    • rust-lang/rust#105394
    • rust-lang/rust#115301
    • rust-lang/rust#116384
      • rust-lang/rust#116379
      • rust-lang/rust#116328
      • rust-lang/rust#116282
      • rust-lang/rust#116261
      • rust-lang/rust#114654
    • rust-lang/rust#116376
      • rust-lang/rust#116374
      • rust-lang/rust#116371
      • rust-lang/rust#116358
      • rust-lang/rust#116210
      • rust-lang/rust#115863
    • rust-lang/rust#115025
    • rust-lang/rust#116372
      • rust-lang/rust#116361
      • rust-lang/rust#116355
      • rust-lang/rust#116351
      • rust-lang/rust#116158
      • rust-lang/rust#115726
      • rust-lang/rust#113053
    • rust-lang/rust#116083
    • rust-lang/rust#102099
    • rust-lang/rust#116356
      • rust-lang/rust#116350
      • rust-lang/rust#116349
      • rust-lang/rust#116289
      • rust-lang/rust#114454
      • rust-lang/rust#114453
    • rust-lang/rust#116331
    • rust-lang/rust#116346
      • rust-lang/rust#116340
      • rust-lang/rust#116326
      • rust-lang/rust#116313
    • rust-lang/rust#116276
    • rust-lang/rust#115898
    • rust-lang/rust#116325
    • rust-lang/rust#116317
    • rust-lang/rust#116207
    • rust-lang/rust#116281
    • rust-lang/rust#116304
    • rust-lang/rust#116259
    • rust-lang/rust#116228
    • rust-lang/rust#116224
    • rust-lang/rust#115554
    • rust-lang/rust#116311
      • rust-lang/rust#116299
      • rust-lang/rust#116295
      • rust-lang/rust#116292
    • rust-lang/rust#116307
    • rust-lang/rust#115670
    • rust-lang/rust#116225
    • rust-lang/rust#116302
    • rust-lang/rust#116108
    • rust-lang/rust#116160
    • rust-lang/rust#116157
    • rust-lang/rust#116127
    • rust-lang/rust#116286
    • rust-lang/rust#116254
    • rust-lang/rust#116195
    • rust-lang/rust#116280
    • rust-lang/rust#115933
    • rust-lang/rust#115546
    • rust-lang/rust#115368
    • rust-lang/rust#116275
      • rust-lang/rust#116263
      • rust-lang/rust#116241
      • rust-lang/rust#116216
      • rust-lang/rust#116030
      • rust-lang/rust#116024
      • rust-lang/rust#112123
    • rust-lang/rust#113301
    • rust-lang/rust#113797
    • rust-lang/rust#115759
    • rust-lang/rust#116260
      • rust-lang/rust#116253
      • rust-lang/rust#116245
      • rust-lang/rust#116239
      • rust-lang/rust#116234
      • rust-lang/rust#116231
      • rust-lang/rust#116201
      • rust-lang/rust#116133
    • rust-lang/rust#116176
    • rust-lang/rust#116089
    • rust-lang/rust#115986
    opened by pvdrz 3
  • Profile-Guided Optimization (PGO) and LLVM BOLT for the prebuilt binaries

    Profile-Guided Optimization (PGO) and LLVM BOLT for the prebuilt binaries

    Hi!

    According to the https://github.com/ferrocene/ferrocene#installation link, there are prebuilt binaries. Are these binaries optimized with PGO and/or LLVM BOLT as it's already done for Rustc (doc)?

    For us it's important since we want to know - do we need to rebuild the compiler from scratch to improve compilation speed or we can use already-built PGO-optimized binaries.

    opened by zamazan4ik 0
  • Repository diverged from upstream `master`

    Repository diverged from upstream `master`

    While trying to pull the latest changes from the upstream master branch, the automation failed due to the following merge conflict:

    diff --cc src/bootstrap/config.rs
    index 98ce4363cf4,1755c3166de..00000000000
    --- a/src/bootstrap/config.rs
    +++ b/src/bootstrap/config.rs
    @@@ -607,9 -583,9 +609,15 @@@ impl Merge for TomlConfig 
                  rust,
                  dist,
                  target,
    ++<<<<<<< HEAD
     +            ferrocene,
     +            profile: _,
     +            changelog_seen,
    ++=======
    +             profile: _,
    +             changelog_seen,
    +             change_id,
    ++>>>>>>> pull-upstream-temp--do-not-use-for-real-code
              }: Self,
              replace: ReplaceOpt,
          ) {
    diff --cc src/doc/rustc/src/platform-support.md
    index c4585bd150f,ef4eb5a1965..00000000000
    --- a/src/doc/rustc/src/platform-support.md
    +++ b/src/doc/rustc/src/platform-support.md
    @@@ -262,21 -269,18 +269,36 @@@ target | std | host | note
      `bpfel-unknown-none` | * |  | BPF (little endian)
      `csky-unknown-linux-gnuabiv2` | ✓ |  | C-SKY abiv2 Linux(little endian)
      `hexagon-unknown-linux-musl` | ? |  |
    ++<<<<<<< HEAD
     +`i386-apple-ios` | ✓ |  | 32-bit x86 iOS
     +[`i386-lynx-lynxos178`](platform-support/i386-lynx-lynxos178.md) | * |  | 32-bit LynxOS-178 (2022.07)
     +[`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * |  | 32-bit x86 QNX Neutrino 7.0 RTOS |
     +`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+)
     +`i686-pc-windows-msvc` | * |  | 32-bit Windows XP support
     +[`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
     +`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku
     +[`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd
     +[`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2
     +[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD
     +`i686-uwp-windows-gnu` | ? |  |
     +`i686-uwp-windows-msvc` | ? |  |
     +`i686-wrs-vxworks` | ? |  |
     +[`loongarch64-unknown-none`](platform-support/loongarch-none.md) | * |  | LoongArch64 Bare-metal (LP64D ABI)
     +[`loongarch64-unknown-none-softfloat`](platform-support/loongarch-none.md) | * |  | LoongArch64 Bare-metal (LP64S ABI)
    ++=======
    + `i386-apple-ios` | ✓ |  | 32-bit x86 iOS [^x86_32-floats-return-ABI]
    + [`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * |  | 32-bit x86 QNX Neutrino 7.0 RTOS  [^x86_32-floats-return-ABI]
    + `i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+) [^x86_32-floats-return-ABI]
    + `i686-pc-windows-msvc` | * |  | 32-bit Windows XP support [^x86_32-floats-return-ABI]
    + [`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ | [^x86_32-floats-return-ABI]
    + `i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku [^x86_32-floats-return-ABI]
    + [`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI]
    + [`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2 [^x86_32-floats-return-ABI]
    + [`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD [^x86_32-floats-return-ABI]
    + `i686-uwp-windows-gnu` | ? |  | [^x86_32-floats-return-ABI]
    + `i686-uwp-windows-msvc` | ? |  | [^x86_32-floats-return-ABI]
    + `i686-wrs-vxworks` | ? |  | [^x86_32-floats-return-ABI]
    ++>>>>>>> pull-upstream-temp--do-not-use-for-real-code
      [`m68k-unknown-linux-gnu`](platform-support/m68k-unknown-linux-gnu.md) | ? |  | Motorola 680x0 Linux
      `mips-unknown-linux-uclibc` | ✓ |  | MIPS Linux with uClibc
      [`mips64-openwrt-linux-musl`](platform-support/mips64-openwrt-linux-musl.md) | ? |  | MIPS64 for OpenWrt Linux MUSL
    diff --cc tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
    index b887b74474f,28a7ffda371..00000000000
    --- a/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
    +++ b/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
    @@@ -5,7 -5,7 +5,11 @@@
            let mut _0: bool;
        
            bb0: {
    ++<<<<<<< HEAD
     ++         Coverage::Counter(0) for /the/src/instrument_coverage.rs:21:1 - 23:2;
    ++=======
    + +         Coverage::Counter(0) for [/the/src/instrument_coverage.rs:20:1 - 22:2];
    ++>>>>>>> pull-upstream-temp--do-not-use-for-real-code
                _0 = const true;
                return;
            }
    diff --cc tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
    index 810b4646325,9a8caa26307..00000000000
    --- a/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
    +++ b/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
    @@@ -8,12 -8,12 +8,20 @@@
            let mut _3: !;
        
            bb0: {
    ++<<<<<<< HEAD
     ++         Coverage::Counter(0) for /the/src/instrument_coverage.rs:12:1 - 12:11;
    ++=======
    + +         Coverage::Counter(0) for [/the/src/instrument_coverage.rs:11:1 - 11:11];
    ++>>>>>>> pull-upstream-temp--do-not-use-for-real-code
                goto -> bb1;
            }
        
            bb1: {
    ++<<<<<<< HEAD
     ++         Coverage::Expression(0) = Counter(0) + Counter(1) for /the/src/instrument_coverage.rs:13:5 - 14:17;
    ++=======
    + +         Coverage::Expression(0) = Counter(0) + Counter(1) for [/the/src/instrument_coverage.rs:12:5 - 13:17];
    ++>>>>>>> pull-upstream-temp--do-not-use-for-real-code
                falseUnwind -> [real: bb2, unwind: bb6];
            }
        
    @@@ -27,15 -27,14 +35,23 @@@
            }
        
            bb4: {
    ++<<<<<<< HEAD
     ++         Coverage::Expression(2) = Expression(1) + Zero for /the/src/instrument_coverage.rs:18:1 - 18:2;
     ++         Coverage::Expression(1) = Expression(0) - Counter(1) for /the/src/instrument_coverage.rs:15:13 - 15:18;
    ++=======
    + +         Coverage::Expression(1) = Expression(0) - Counter(1) for [/the/src/instrument_coverage.rs:14:13 - 14:18, /the/src/instrument_coverage.rs:17:1 - 17:2];
    ++>>>>>>> pull-upstream-temp--do-not-use-for-real-code
                _0 = const ();
                StorageDead(_2);
                return;
            }
        
            bb5: {
    ++<<<<<<< HEAD
     ++         Coverage::Counter(1) for /the/src/instrument_coverage.rs:16:10 - 16:11;
    ++=======
    + +         Coverage::Counter(1) for [/the/src/instrument_coverage.rs:15:10 - 15:11];
    ++>>>>>>> pull-upstream-temp--do-not-use-for-real-code
                _1 = const ();
                StorageDead(_2);
                goto -> bb1;
    * Unmerged path tests/ui/native-library-link-flags/mix-bundle-and-whole-archive-link-attr.rs
    * Unmerged path tests/ui/native-library-link-flags/mix-bundle-and-whole-archive.rs
    

    The automation will not open any more pull requests pulling from upstream until the merge conflict is fixed. There are multiple ways to fix the merge conflict:

    • If all the conflicts should be resolved by keeping the Ferrocene changes, start the workflow with the "ours" merge strategy.
    • If all the conflicts should be resolved by using the new code introduced by Rust upstream, start the workflow with the "theirs" merge strategy.
    • Otherwise, you'll have to fix the merge conflict locally (see below for instructions).
    How to fix the merge conflict manually

    To fix the conflict, create a new branch and execute the following command:

    ferrocene/tools/pull-upstream/pull.sh master
    

    The command will try pull the latest changes from upstream into the branch, and exit when the merge conflict is detected. Fix the merge conflict and then run:

    git merge --continue
    

    The command will finish the merge. You'll then be able to push the local branch to GitHub and open a PR for it.

    automation 
    opened by github-actions[bot] 2
  • matrix: sort missing and partial items at the top

    matrix: sort missing and partial items at the top

    Missing ones (as in ids that have no associated test) are placed at the bottom, which is too far to scroll to, and partial ones are mixed in with the test of the items (so hard to miss). Would be better to place both at the top.

    opened by tshepang 0
Owner
Ferrocene
An open source qualified Rust compiler for functional safety
Ferrocene
Elemental System Designs is an open source project to document system architecture design of popular apps and open source projects that we want to study

Elemental System Designs is an open source project to document system architecture design of popular apps and open source projects that we want to study

Jason Shin 9 Apr 10, 2022
The source code that accompanies Hands-on Rust: Effective Learning through 2D Game Development and Play by Herbert Wolverson

Hands-on Rust Source Code This repository contains the source code for the examples found in Hands-on Rust. These are also available from my publisher

Herbert 261 Dec 14, 2022
This repository contains the Rust source code for the algorithms in the textbook Algorithms, 4th Edition

Overview This repository contains the Rust source code for the algorithms in the textbook Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

chuan 549 Dec 26, 2022
Source code for the book Rust in Action

Welcome to Rust in Action source code This source code repository is a companion to the Rust in Action book available from Manning Publications. Suppo

Rust in Action 1.3k Dec 30, 2022
Source code from Atlas, our 64k demo presented at Revision 2019 with Macau Exports

Atlas source code dump This is a dump of the source code for the engine, graphics tool and player for Atlas, our 64k demo released with Macau Exports

Monad 65 Jan 2, 2023
Tool to convert variable and function names in C/C++ source code to snake_case

FixNameCase Tool to convert variable and function names in C/C++ source code to snake_case. Hidden files and files listed in .gitignore are untouched.

AgriConnect 4 May 25, 2023
An inquiry into nondogmatic software development. An experiment showing double performance of the code running on JVM comparing to equivalent native C code.

java-2-times-faster-than-c An experiment showing double performance of the code running on JVM comparing to equivalent native C code ⚠️ The title of t

xemantic 49 Aug 14, 2022
Open-source Autonomy Software in Rust-lang with gRPC for the Roomba series robot vacuum cleaners

CleanIt Open-source Autonomy Software in Rust-lang with gRPC for the Roomba series robot vacuum cleaners Motivation Motivation is to build a complete

Kristoffer Rakstad Solberg 216 Dec 13, 2022
This repository contains the source of "The Rust Programming Language" book.

The Rust Programming Language This repository contains the source of "The Rust Programming Language" book. The book is available in dead-tree form fro

The Rust Programming Language 11.2k Jan 8, 2023
Maai_core is an open source AI that is written in rust

maai_core is an open source AI that is written in rust. It is more focused on being lightweight and speedy.

Max Beier 2 Aug 1, 2022
An open source WCH-Link library/command line tool written in Rust.

wlink - WCH-Link command line tool NOTE: This tool is still in development and not ready for production use. Known Issue: Only support binary firmware

WCH MCU for Rust 22 Mar 7, 2023
Rust based magic-string with source map chains support

enhanced-magic-string Rust implementation of https://www.npmjs.com/package/magic-string with original sourcemap chain support. license. This project i

Farm 3 Nov 5, 2023
Diosic is an open source web-based music collection server and streamer

Diosic is an open source web-based music collection server and streamer. Mainly suitable for users who need to deploy on servers with low hardware specifications.

Jinker 45 Jan 28, 2023
Open source bible study program on Linux!

Open Witness Library Open Witness Library is a program to read articles that carries God's true name. Warning This branch is outdated, please refer to

Wellington Júnior 5 Jun 29, 2023
An open-source UCIe implementation developed at UC Berkeley.

UCIe An open-source UCIe implementation developed at UC Berkeley. This project is very early-stage. If you are interested in contributing, see below.

null 3 Aug 18, 2023
An AI-native lightweight, reliable, and high performance open-source vector database.

What is OasysDB? OasysDB is a vector database that can be used to store and query high-dimensional vectors. Our goal is to make OasysDB fast and easy

Oasys 3 Dec 25, 2023
Leetcode Solutions in Rust, Advent of Code Solutions in Rust and more

RUST GYM Rust Solutions Leetcode Solutions in Rust AdventOfCode Solutions in Rust This project demostrates how to create Data Structures and to implem

Larry Fantasy 635 Jan 3, 2023
Rust Sandbox [code for 15 concepts of Rust language]

Rust-Programming-Tutorial Rust Sandbox [code for 15 concepts of Rust language]. The first time I've been introduced to Rust was on January 2022, you m

Bek Brace 4 Aug 30, 2022
TypeRust - simple Rust playground where you can build or run your Rust code and share it with others

Rust playground Welcome to TypeRust! This is a simple Rust playground where you can build or run your Rust code and share it with others. There are a

Kirill Vasiltsov 28 Dec 12, 2022