Can I compile rust bare metal for a RaspberryPi 4b?

Hello,

I am as you can see an absolute newcomer to Rust and did not find any helpful information on whether I can compile Rust code bare metal for a RaspberryPi 4b.
I want to do this because I want to build an operating system for ARM 64 using tutorials I found online.
Thanks for your help.

Lot's of people have been working on bare-metal Rust for the Pi and building little operating systems. For example:

There is a bare-metal section of the Raspberry Pi forum where such things are discussed.
https://forums.raspberrypi.com/viewforum.php?f=72&sid=266fad438bba6120e001c2513b7536fa

1 Like

Hey one more question - I currently use an M2 Macbook, would you recommend switching to an ARM64 Windows Laptop? It has for instance this software available Preparing Raspberry PI for JTAG Debugging – Sysprogs Tutorials

I have never done this but it is my understanding the OpenCD can be used on the M1.

As a long time Linux and now Mac M1 user I would try very hard not to have to move to Windows world.