5 releases
Uses new Rust 2024
new 0.2.1 | Apr 29, 2025 |
---|---|
0.2.0 | Apr 23, 2025 |
0.1.0 | Apr 1, 2025 |
0.1.0-rc.2 | Nov 12, 2024 |
#207 in Robotics
451 downloads per month
Used in sift_stream
3.5MB
84K
SLoC
sift_rs
largely contains protobuf-generated code used to interact with Sift's gRPC API as well as some
utility wrappers. Due to tonic relying on
tokio, it is required that users have tokio
installed
in order to communicate with Sift over gRPC.
Quickstart
Start by installing sift_rs
cargo add sift_rs
Then install tokio
:
cargo add tokio --features full
Then we can establish a connection to Sift and use one of the protobuf service clients like so:
use sift_rs::{
Credentials, SiftChannelBuilder,
ping::v1::{PingRequest, ping_service_client::PingServiceClient},
};
use std::env;
#[tokio::main]
async fn main() {
let credentials = Credentials::Config {
apikey: env::var("SIFT_TOKEN").unwrap(),
uri: env::var("SIFT_GRPC").unwrap(),
};
let conn = SiftChannelBuilder::new(credentials).build().unwrap();
let mut ping_service = PingServiceClient::new(conn);
let ping_response = ping_service.ping(PingRequest::default()).await.unwrap();
println!("{}", ping_response.into_inner().response);
}
sift_rs
sift_rs
largely contains protobuf-generated code used to interact with Sift's gRPC API as well as some
utility wrappers.
See the examples directory for demonstrations on how to connect to Sift and use these services. If you're interested in streaming telemetry to Sift, see sift_stream.
Dependencies
~15–25MB
~438K SLoC