| Crates.io | eppo |
| lib.rs | eppo |
| version | 5.2.1 |
| created_at | 2024-05-14 17:52:16.071473+00 |
| updated_at | 2026-01-07 17:27:55.812193+00 |
| description | Eppo SDK for Rust |
| homepage | https://docs.geteppo.com/sdks/server-sdks/rust |
| repository | https://github.com/Eppo-exp/rust-sdk |
| max_upload_size | |
| id | 1239879 |
| size | 106,872 |
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.
Add it with cargo:
cargo add eppo
Or add it to Cargo.toml manually:
[dependencies]
eppo = "0.1.0"
Initialize an instance of Eppo's client. Once initialized, the client can be used to make assignments in your app.
use eppo::ClientConfig;
let mut client = ClientConfig::from_api_key("api-key").to_client();
let thread = client.start_poller_thread();
thread.wait_for_configuration_timeout(std::time::Duration::from_secs(5));
let user = get_current_user();
let assignment = client.get_assignment(
"show-new-feature",
&user.id,
&user.attributes,
);
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
}
}