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

Download history 40/week @ 2025-02-10 226/week @ 2025-02-17 41/week @ 2025-02-24 66/week @ 2025-03-03 64/week @ 2025-03-10 73/week @ 2025-03-17 52/week @ 2025-03-24 160/week @ 2025-03-31 76/week @ 2025-04-07 49/week @ 2025-04-14 163/week @ 2025-04-21

451 downloads per month
Used in sift_stream

MIT license

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

Crates.io docs.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