| Crates.io | statsig |
| lib.rs | statsig |
| version | 1.4.0 |
| created_at | 2022-12-09 23:07:39.056903+00 |
| updated_at | 2024-10-10 17:41:15.694368+00 |
| description | Statsig Rust SDK for usage in multi-user server environments. |
| homepage | https://statsig.com/ |
| repository | https://github.com/statsig-io/rust-sdk |
| max_upload_size | |
| id | 733534 |
| size | 706,611 |
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
}
}