12 releases (5 stable)

1.4.0 Oct 10, 2024
1.2.0 Aug 19, 2024
1.0.0 Jul 6, 2024
0.3.0 Apr 17, 2024
0.2.0 Dec 10, 2022

#317 in Web programming

Download history 46067/week @ 2024-08-11 43115/week @ 2024-08-18 13687/week @ 2024-08-25 17217/week @ 2024-09-01 20610/week @ 2024-09-08 28009/week @ 2024-09-15 25875/week @ 2024-09-22 27317/week @ 2024-09-29 27708/week @ 2024-10-06 18682/week @ 2024-10-13 26728/week @ 2024-10-20 30010/week @ 2024-10-27 33612/week @ 2024-11-03 23776/week @ 2024-11-10 39450/week @ 2024-11-17 32531/week @ 2024-11-24

131,330 downloads per month

ISC license

300KB
2K SLoC

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
    }
}

Dependencies

~12–25MB
~345K SLoC