growthbook-rust-sdk

Crates.iogrowthbook-rust-sdk
lib.rsgrowthbook-rust-sdk
version1.1.0
created_at2024-08-27 18:45:28.684125+00
updated_at2025-06-30 13:26:05.826324+00
descriptionunofficial growthbook rust sdk
homepagehttps://github.com/will-bank/growthbook-rust-sdk
repositoryhttps://github.com/will-bank/growthbook-rust-sdk
max_upload_size
id1353720
size320,844
Alefh Sousa (alefhsousa)

documentation

README

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.

Commit count: 56

cargo fmt