Unsafe Rust bindings for srsLTE on linux generated via bindgen.
These are bindings for the components written in C (i.e. srslte/src/lib*, but may be extended to cover the high-level C++ components at some point (once bindgen can handle C++).
- Clone srsLTE from GitHub
- Build srsLTE and install them somewhere (i.e. adding
-DCMAKE_INSTALL_PREFIX=<install dir>
to the cmake command) - export the install directory
export SRSLTE_DIR=<install dir>
and/or add it to your .bashrc/.zshrc. cargo build
to make the bindings and runcargo test
to run bindgen's automatically generated layout tests
Native
Cargo.toml
[dependencies]
srslte-sys = {git = "https://github.com/razorheadfx/srslte-sys"}
lib.rs
extern crate srslte_sys as srslte;
- Generates bindings for srslte_rf components but does not link them, this is to prevent linking errors when using various versions of hackrf or libuhd. If you want the build script to link them, enable the
srslte_rf
feature in your Cargo.toml.
- Build a safe wrapper in another project
- Publish on crates.io