statsig

Crates.iostatsig
lib.rsstatsig
version1.4.0
sourcesrc
created_at2022-12-09 23:07:39.056903
updated_at2024-10-10 17:41:15.694368
descriptionStatsig Rust SDK for usage in multi-user server environments.
homepagehttps://statsig.com/
repositoryhttps://github.com/statsig-io/rust-sdk
max_upload_size
id733534
size706,611
Daniel (daniel-statsig)

documentation

https://docs.statsig.com/server/rustSDK

README

Statsig for Rust

Test

use statsig::{Statsig, StatsigUser};
use tokio;

#[tokio::main]
async fn main() {
    Statsig::initialize("secret-key").await;

    let user = StatsigUser::with_user_id("a-user".to_string());

    let passes_gate =  Statsig::check_gate(&user, "a_gate").ok().unwrap_or(false);
    if passes_gate {
        // Show cool new feature
    }
}
Commit count: 163

cargo fmt