Rust Quickstart
Getting started with the Rust Sift client library
Credentials
Before starting this section be sure to retrieve your API key and the appropriate Sift URL for your provisioned environment. Instructions on how to retrieve the API key and URL and can be found in the authentication section of the documentation.
To connect to Sift's gRPC API using Rust we will use sift_rs.
-
Begin by creating a new Rust project using
cargo new
and adding thesift_rs
crate.In addition to
sift_rs
we will use the Tokio asynchronous runtime. -
With those dependencies installed, copy-paste the following into your
main.rs
: -
Execute the program from your commandline with the
SIFT_URI
andSIFT_API_KEY
environment variables from the authentication page:If everything was setup correctly you should see the following printed to your standard output: