AW: Rust on RTEMS

Jan.Sommer at Jan.Sommer at
Mon Jan 29 18:27:25 UTC 2024

Hi everyone,

Sorry for the delayed response.
Yes, that’s me. I am responsible for the RTEMS related work-package in the “cRustacea in Space” project.
One of the goals is to create a prototypical port of Rust to RTEMS for our example target platform (Xilinx Zynq).
The status is currently the following:

  *   I have a custom target based added to the compiler sources which compiles Rust code for the Zynq
  *   I ported the stdlib to work with RTEMS (using the POSIX API)
  *   I ported the libc wrapper for this to work
  *   I can now compile the below application and unit test and run it on the (simulated) target using cargo build/run/test without the need to use any extra attributes as a work-around.

fn add_two_numbers(num1: i32, num2: i32) -> i32 {
    num1 + num2

fn test_add_two_numbers() {
    assert_eq!(add_two_numbers(2, 3), 5);

pub fn main() -> ! {
     println!("Hallo from println");
     println!("2 + 2 = {}", add_two_numbers(2,2));

     loop {}

My next goal is to add those changes to the official Rust repos in order to have it as a Tier3 target platform.
I need to tidy up my commits and have a few open questions regarding naming conventions (I will start a corresponding thread here shortly).
With that done, it should be much easier for others to play around with Rust on RTEMS as it only requires to install the nightly compiler via rustup.



Von: Joel Sherrill <joel at>
Gesendet: Mittwoch, 20. Dezember 2023 23:38
An: Frank Kühndel <frank.kuehndel at>
Cc: Molock, Dwaine S. (GSFC-5820) <dwaine.s.molock at>; rtems-users at <users at>; Sommer, Jan <Jan.Sommer at>
Betreff: Re: Rust on RTEMS

Karel Gardas posted in February that he has Rust on RTEMS on an arm.

Frank. Are there instructions on building the tools chain somewhere?

And is Jan Sommer part of the DLR Rust on RTEMS project?


On Wed, Dec 20, 2023, 3:59 PM Frank Kühndel <frank.kuehndel at<mailto:frank.kuehndel at>> wrote:
Hello Dwaine,

On 12/20/23 20:41, Molock, Dwaine S. (GSFC-5820) wrote:
 > Hello,
 > Has anyone been able to execute Rust on RTEMS?

Yes – to use RTEMS from within a Rust application, with


 > If so, is there a how to guide and what architecture and development
hardware was used?

I have not yet found time to write a documentation despite I want to do
so. Sorry for this. Ferrous Systems first extended Rust to run on
Gaisler SPARC bare metal and then they figured it works with RTEMS 5
from Gaisler, too. Their documentation is here:

I did run my examples only on simulators. I tried two architectures with
RTEMS 6: Leon3 and RISC-V.


embedded brains GmbH & Co. KG
Herr Frank KÜHNDEL
Dornierstr. 4
82178 Puchheim
email: frank.kuehndel at<mailto:frank.kuehndel at>
phone:  +49-89-18 94 741 - 23
mobile: +49-176-15 22 06 - 11

Registergericht: Amtsgericht München
Registernummer: HRA 117265
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
users mailing list
users at<mailto:users at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list