3 unstable releases
0.2.1 | Jan 31, 2023 |
---|---|
0.2.0 | Dec 10, 2022 |
0.1.0 | Dec 9, 2022 |
#2 in #gate
47 downloads per month
290KB
1.5K
SLoC
Statsig for Rust
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
}
}
Dependencies
~10–19MB
~373K SLoC