5 releases (stable)

4.0.1 Oct 16, 2024
4.0.0 Oct 8, 2024
3.0.1 Sep 19, 2024
3.0.0 Aug 14, 2024
0.1.0 May 14, 2024

#190 in Configuration

Download history 114/week @ 2024-08-14 9/week @ 2024-09-11 118/week @ 2024-09-18 23/week @ 2024-09-25 91/week @ 2024-10-02 75/week @ 2024-10-09 176/week @ 2024-10-16 3/week @ 2024-10-23 2/week @ 2024-10-30 3/week @ 2024-11-06

186 downloads per month

MIT license

210KB
4K SLoC

Eppo Rust SDK

Crates.io Version Crates.io MSRV docs.rs

Eppo is a modular flagging and experimentation analysis tool. Eppo's Rust SDK is designed to facilitate assignments in multi-user server-side contexts. You will need an Eppo account before proceeding.

Refer to SDK documentation for how to install and use the SDK.

Features

  • Feature gates
  • Kill switches
  • Progressive rollouts
  • A/B/n experiments
  • Mutually exclusive experiments (Layers)
  • Dynamic configuration

Installation

Add it with cargo:

cargo add eppo

Or add it to Cargo.toml manually:

[dependencies]
eppo = "0.1.0"

Quick Start

Initialize an instance of Eppo's client. Once initialized, the client can be used to make assignments in your app.

Initialize Client

use eppo::ClientConfig;

let mut client = ClientConfig::from_api_key("api-key").to_client();
client.start_poller_thread();

Assign Anywhere

let user = get_current_user();

let assignment = client.get_assignment(
    "show-new-feature",
    &user.id,
    &user.attributes,
);

Assignment Logger

Pass a logging callback function to the assignment_logger method in ClientConfig when initializing the SDK to capture assignment data for analysis.

struct MyAssignmentLogger;

impl AssignmentLogger for MyAssignmentLogger {
    fn log_assignment(&self, event: AssignmentEvent) {
        // Implement assignment logging logic here
    }
}

Dependencies

~9–21MB
~283K SLoC