// the find
rp-rs/rp-hal
A Rust Embedded-HAL for the rp series microcontrollers
rp-hal is the community Rust HAL for Raspberry Pi's RP2040 and RP235x microcontrollers, implementing the embedded-hal traits for all the usual peripherals (GPIO, SPI, I2C, UART, DMA, PIO, PWM, ADC). It's the go-to choice if you want to write bare-metal Rust for a Pico or Pico 2 without the official C SDK. Target audience is embedded Rust developers, BSP authors, and driver crate maintainers.
The PIO support is genuinely good — you can assemble PIO programs at runtime on the MCU itself via pio-rs, which is unusual and lets you do things the C SDK makes painful. The RP235x HAL covers all three execution modes (Cortex-M33, RISC-V Hazard3, and arch_flip to switch at runtime), which mirrors the hardware's actual flexibility rather than pretending one mode doesn't exist. On-target tests exist and run real hardware loopbacks for DMA, SPI, I2C, and GPIO — not just compile checks. The rp-binary-info crate is a small but practical addition: picotool metadata support means your firmware identifies itself properly, which saves time when you have multiple UF2s lying around.
Still pre-1.0 with an explicit 'likely to remain volatile' warning in the README — API-breaking changes are on the table, and there's no stability guarantee for anything. The RP2350B (48-pin, extra GPIO) only has partial support; if your board uses those extra pins you may hit unimplemented territory. The split between rp2040-hal and rp235x-hal means shared logic is being slowly migrated into rp-hal-common but isn't there yet — if you maintain a dual-target BSP, you're duplicating work. No USB device support in rp235x-hal (it's there for RP2040 via rp2040-hal/src/usb.rs, but absent from the RP235x tree), which is a real gap given the Pico 2 has USB hardware.