The Linux Foundation Projects
Skip to main content
Blog

Project RP004: Support for a 64-bit RISC-V Linux port of Rust to Tier-1

By April 15, 2025No Comments

Motivation

The Rust programming language community has a Target Tier Policy that defines the level of support and expectations for different platform ports. Tier-1 targets receive the highest level of quality assurance and are considered production-ready. Reaching Tier-1 status ensures that a Rust port is reliable and maintainable across a wide range of product ecosystems.

Currently, the 64-bit RISC-V Linux port of Rust, identified by the target triplet riscv64gc-unknown-linux-gnu, is classified as a Tier-2 target. This port was introduced in Rust 1.41.0 (released January 30, 2020), and its usage has been steadily growing since. Today, multiple operating systems–including Linux, FreeBSD, Android, and NuttX–support systems based on the riscv64gc architecture, with adoption continuing to increase.

A notable example of production use comes from Google, which has integrated RISC-V support into Android. According to Lars Bergstrom of Google: “Android has added support for RISC-V as a target as of Android 15, with the projected RVA23 profile as a baseline for Android 16. With its well-known reliance on Rust as a memory safe alternative to C/C++, it’s critical to have RISC-V support at Tier-1 for Android.”

The RISC-V Software Ecosystem (RISE) project, an industry-led initiative to accelerate open-source software development for the RISC-V architecture, has also heard from users who are eager to adopt Rust. However, many remain hesitant due to the current Tier 2 classification of the RISC-V target.

In response, the RISE Project issued an RFP in 2023 to elevate the 64-bit RISC-V Linux Rust port to Tier-1 (“Guaranteed to work”) status–equivalent to the support currently offered for x86_64 (x86-64-unknown-linux-gnu) and ARMv8-A (aarch64-unknown-linux-gnu) target triples. The proposal requested, among other things, support for both cross-compilation and hosted-compilation, and outlined key delivery milestones, including: i) CI Integration and Gap-Analysis; ii) a 100% pass rate for the Rust language test suite; and iii) promotion of the riscv64gc-unknown-linux-gnu target triple to Tier-1 status.

The goal: to understand and fill the gaps remaining in the path to attaining Tier-1 (without host tools) status for this target and ultimately help drive Rust Project adoption.

In 2024, the contract was awarded to a team of RISC-V and Rust experts from Codethink, SiFive, Rivos, and Ferrous Systems.

The RFC

All major changes to the Rust language must go through an RFC process. In line with this requirement, the team focused on three key steps to demonstrate that the RISC-V target libraries met the criteria necessary for promotion to Tier-1 (without host tools) status.

The Three-Step Approach

1. Identify and resolve failing tests for the target.
The team analyzed the riscv64gc-unknown-linux-gnu target to determine which Rust tests were failing and submitted a series of pull requests to fix them.

2. Enable continuous integration (CI) testing for the target.
To ensure ongoing reliability, the team added support for testing the RISC-V on Rust’s CI infrastructure.

3. Create an RFC proposing Tier 1 target status.

The team submitted an official RFC to initiate community discussion around the upgrade.

Test Results and Performance Bottlenecks

With the exception of a few explicitly ignored tests, all test suites for the RISC-V target passed successfully. However, during this process, the team identified a significant performance concern: the time required to build and run the test suite on RISC-V was substantially longer than on existing Tier-1 targets.

Per the Rust Project’s Tier-1 Target Tier Policy, Section 1.e, Tier 1 targets must not require significantly more time for test execution compared to others. Unfortunately, the x.py test run took approximately 6 hours on both: Scaleway Elastic Metal RV1 and a virtual machine with 6 CPUs, 16GB of RAM.

Even when emulating the RISC-V platform with greater-than-typical resources, test durations remained much higher than for other platforms. This performance gap in existing RISC-V hardware and virtualization environments presented a clear obstacle to promoting the target with host tools support.

Due to these limitations, the team decided to pursue Tier 1 support for the RISC-V target only, and not for host tools. In practical terms, this means supporting building for the riscv64gc-unknown-linux-gnu target but not building on it or with it (i.e., no Tier 1 support for the RISC-V host environment).

Conclusion

The contract work commissioned by the RISE Project was completed on schedule, and significant improvements to the RISC-V target were successfully merged upstream. However, due to limitations in the current generation of available RISC-V hardware, the target does not yet meet the performance requirements for full Tier 1 status. Specifically, test suite execution times remain too high to satisfy Rust’s Tier 1 policy.

That said, as newer and more capable RISC-V silicon becomes available–and can reliably complete the full test suite within an acceptable timeframe–the conversation around Tier 1 promotion can and should be revisited.