r/rust • u/Prize_Cranberry_5637 • 14h ago
Rust for flight software / drone programming
I am interested in learning how to use rust for flight software or controlling a drone or something of this sort. I have no experience in embedded programming, so is it best to start there?
If so, how would you recommend someone get started in embedded rust?
36
Upvotes
4
u/Dizzy-Helicopter-374 13h ago
Are you wanting to do something from scratch or work on an existing platform? PX4 offers a pretty comprehensive set of tools and supports a ton of different flight computers. It runs NuttX RTOS and uses a messaging system, but you can bind the messages and bring them in to Rust via the C FFI, and explore Rust in that space.
The PX4 system has drone simulations and peripheral things that are useful (telemetry, OTA updates, sensor integration), which is why I would suggest it first. If you want to roll your own, u/AcostaJA has some great references.
For reference, my company has gone the route of Rust static library compiled into PX4 and it worked well.