Article

Improving 64-bit RISC-V Linux support in Rust

Published on 2 min read

    Ferrous Systems is partnering with Codethink to propose lifting the 64-bit RISC-V Linux (riscv64gc-unknown-linux-gnu) target to Tier 1 though work funded by the RISE Project. While we at Ferrous Systems are fully convinced by Rust’s versatility and functionality, support for some targets is less robust.

    The Rust Project’s support for different platforms ("targets") are organized into three tiers, each with a different set of guarantees. Tier 1 provides the most comprehensive assurance that the platform can work with Rust. Tier 1 targets are guaranteed to build and pass all tests.

    Tier 2 targets can be thought of as "guaranteed to build". The Rust project builds official binary releases of the standard library (or, in some cases, only the core library) for each tier 2 target, and automated builds ensure that each tier 2 target can be used as build target after each change.

    Tier 3 targets are those which the Rust codebase has support for, but which the Rust project does not build or test automatically, so they may or may not work.

    Currently, the 64-bit RISC-V Linux target is in the middle – at Tier 2.

    As the makers of Ferrocene, we have a vested interest in bringing Rust to the highest level of functionality for platforms our customers care about. The 64-bit RISC-V Linux target is especially interesting for us as RISC-V’s open instruction set architecture is ideal for embedded systems via its open instruction set architecture.

    As we keep developing Ferrocene, we want to make sure that it can serve more targets in industries that require ISO26262, IEC61508, and beyond. This includes adding new targets, like riscv64gc-unknown-linux-gnu. In this case, we're using our ability to have a secondary Rust build infrastructure to trial run lifting targets to a higher level before proposing them to the Rust project.

    Working together with Codethink, we have a partner that understands the benefits of bringing 64-bit RISC-V Linux target to Tier 1. This also allows us to start positioning Ferrocene for qualification on more platforms as well.

    Our work has been assisted and guided by upstream contributors such as Jakub Beránek (@kobzol) and Jubilee (@workingjubilee). Thank you!

    If you’re interested in learning more about where we are with the project, don’t hesitate to contact us, or check out Codethink’s blog for a more technical look at bringing the 64-bit RISC-V Linux Target to Tier 1.