1 unstable release

0.1.0 Aug 27, 2024

#9 in #flag

Download history 132/week @ 2024-08-23 23/week @ 2024-08-30 46/week @ 2024-09-13 41/week @ 2024-09-20 79/week @ 2024-09-27 68/week @ 2024-10-04 72/week @ 2024-10-11 127/week @ 2024-10-18 73/week @ 2024-10-25 246/week @ 2024-11-01 223/week @ 2024-11-08 70/week @ 2024-11-15 138/week @ 2024-11-22 45/week @ 2024-11-29

568 downloads per month

MIT license

100KB
2.5K SLoC

GrowthBook Rust SDK

Crates.io

Non-official GrowthBook SDK for Rust services.

This crate provide an easy way to retrieve a feature value using SDK-KEY.


How to use

Initializing SDK

let gb_url = "HTTP_OR_HTTPS_URL";
let sdk_key = "SDK_KEY";
let gb = GrowthBookClient::new(gb_url, sdk_key, None, None)?;

Configuration

The lib is configurable via environment variables as following:

env var required description
GB_HTTP_CLIENT_TIMEOUT false Timeout from gb client to wait a response from gb server. Default value is 10s
GB_UPDATE_INTERVAL false Interval to fetch features data from gb server. Default value is 60s
GB_URL false URL from gb server
GB_SDK_KEY false SDK key to get features from gb server

Examples

Check the client folder for a complete example using the SDK.

Dependencies

~15–29MB
~402K SLoC