`radio`
FreeGeneric radio transceiver traits, mocks, and helpers - [](https://crates.io/crates/radio)
About `radio`
radio-hal is an embedded-hal like abstraction for digital radio devices in Rust. It provides generic core traits for transmit, receive, set channel, fetch RSSI, register access, and configuration, enabling common implementations for packet radio drivers. Blocking helper functions are automatically derived from the traits. Experimental async/await support is available via the nonblocking feature flag (requires nightly Rust and adds std/async-std dependencies). A MockRadio implementation for testing is behind the mock feature flag. The library is extensible for protocol-specific traits (e.g., 802.15.4, BLE, LoRa) and serves as a foundation for building embedded network stacks. It is a work in progress with expected API changes.
Key Features
Pros & Cons
- Provides a common abstraction for diverse radio hardware, similar to embedded-hal
- Automatic blocking helper functions reduce boilerplate
- Experimental async support for nonblocking operation
- Includes MockRadio for easier testing
- Open source under MIT license
- Actively maintained with multiple releases and contributor activity
- Work in progress with expected major API changes
- Async support is experimental and requires nightly Rust and additional std dependencies
- Focused on embedded Rust; not suitable for non-embedded use
- Limited documentation beyond the README