Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
/ flipt-rust Public archive

Official Rust SDK for Flipt

License

Notifications You must be signed in to change notification settings

flipt-io/flipt-rust

Flipt Rust Library (Deprecated)

deprecated

Warning

This SDK is deprecated and will not be maintained going forward. Please use the new Flipt Server Rust SDK instead.

Documentation

API documentation is available at https://www.flipt.io/docs/reference/overview.

SDK documentation is available at https://docs.rs/crate/flipt/latest.

Status

This SDK is considered in 'hardening' status. We will try to minimize breaking changes, however there still may be breaking changes between versions without a major version update.

We recommend pinning the package version to a specific version in your Cargo.toml file. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Install

# Cargo.toml
[dependencies]
flipt = "0.x.0"

Usage

use flipt::api::flag::{Flag, FlagClient, FlagGetRequest};
use flipt::api::ApiClient;
use flipt::Config;

#[tokio::main]
async fn main() -> Result<(), Error> {
    let config = Config::new_from_env().expect("config");
    let client = ApiClient::new(config).expect("build client");

    let flag = client.flags().get(&FlagGetRequest{
      namespace_key: None,
      key: "flag-a",
    }).await
}

Contributing

TODO