This is a pure-rust driver for the nRF24L01 wireless transceivers.
This project aims to support the embedded rust ecosystem. This includes but is not limited to Linux on RPi. Other points of interest:
- crates.io for embedded-hal crates
- the awesome embedded rust list
- the embedded-hal framework
This project deploys several packages: Rust crates and bindings to Node.js and Python.
All packages are developed under the MIT license.
name | version | API docs | Minimum Supported Rust Version |
---|---|---|---|
rf24-rs |
The bindings provided expose all the above Rust crates in one package (per language). We do this to avoid interdependency problems in the language's FFI (Foreign Function Interface).
The binding packages provided will only function on Linux machines. However, installing the packages in a non-Linux environment will still provide the typing information used on Linux.
name | version | API docs | Minimum Supported Node Version |
---|---|---|---|
@rf24/rf24 |
Note
The Node.js binding is actually provided in several packages. The package listed above will list the pre-compiled binary packages as optional dependencies. See the napi-rs docs for more detail and rationale.
Distributions support CPython and PyPy.
name | version | API docs | Minimum Supported Python Version |
---|---|---|---|
rf24-py |
Here is the intended roadmap:
-
implement driver for the nRF24L01 (OTA compatible with RF24 library)
This should be HAL-agnostic in terms of MCU. It would also be nice to reimplement the same API (using rust's
trait
feature) for use on nRF5x radios. -
implement a fake BLE API for the nRF24L01 (see #4)
-
implement network layers (OTA compatible with RF24Network and RF24Mesh libraries)
-
implement ESB support for nRF5x MCUs. This might be guarded under cargo features.
Code coverage is only measured against the Rust crates. The bindings' code is not run through unit tests because they are just a thin wrapper around the Rust crates.
Mostly because I ❤️ rust. There are other driver libraries for the nRF24L01 in pure rust, but they all seem unmaintained or designed to be application-specific. There's even a crate to use the nRF5x chips' ESB support, but this too seems lacking maintainers' attention.