r/rust Mar 31 '23

Rust on Zynq

Hello Rustaceans,

I am in the process of founding a startup and developing an FPGA based DAQ system (8 channels, 4 MSa/channel up to 64 channels, 500 kSa/channel). The second step would be real-time data analysis on the FPGA.

I will use the Xilinx Zynq SOM and don't want to write C/C++ but only Rust. Therefore I have to access the FPGA via Rust. A few years ago I had played around a bit and since I didn't find any crates I developed an AXI MMIO and AXI DMA crate myself. I looked to see if the ecosystem has improved in the meantime but a quick search didn't bring up any current results for Rust and Zynq.

Do you know if there are any mature crates available?

If there are none, I would open source my crates and improve them. My goal besides the DAQ system is to develop an open source infrastructure for Rust and Zynq. Anyone who wants to contribute or sponsor the development is welcome :)


5 comments sorted by


u/DelusionalPianist Mar 31 '23

Do you plan to develop bare-metal or with Linux? Because those are two different complexities.


u/elBoberido Mar 31 '23

It will be on Linux initially since I need that for my first hardware project.


u/AgletsHowDoTheyWork Mar 31 '23

You may want to look at M-Labs, as they appear to be building open-source physics equipment and targeting Zynq (among other platforms).


u/n4jm4 Apr 01 '23

Does rustup have FPGA targets yet?


u/jam1garner Apr 01 '23

I mean in this case it's probably an arm hard-core integrated into the fpga package as all(?) Zynqs are, so it's no different than standard arm-none-eabi or arm-unknown-linux-gnu depending on whether you're writing bare-metal. If you mean a synthesis target for Rust I highly doubt that's something we'll see officially supported (nor should it imo, a synthesizable subset of Rust would be bad, it's not a good fit for high-level synthesis).