The project provides high-level bindings to librealsense2 library as well as low-level FFI interface. It supports asynchronous API and integration with image and nalgebra types.
Add the dependency in Cargo.toml
to import this crate in your project.
toml
[dependencies]
realsense-rust = "^0.3.0"
If you would like to generate Rust bindings during build time, you can enable the buildtime-bindgen
feature.
toml
[dependencies]
realsense-rust = { version = "^0.3.0", features = ["buildtime-bindgen"] }
Please visit the examples directory to see the example usages.
The project uses bindgen to generate bindings from pure C API.
We suggest the official librealsense2 documentation to check out the actual usage of low-level API.
Also, you can choose to browse the generated document for realsense-sys
.
sh
cd $repo/realsense-sys
cargo doc --open
The realsense-rust
crate is basically a wrapper upon the realsense-sys
crate. We suggest to take C++ API as reference and rewrite them in rusty style.
Apache 2.0. See LICENSE file.