Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Version 3 of the Rust SDK includes breaking changes. The most significant changes involve the HTTP transport layer, TLS/crypto feature flags, and some API refinements. To learn how to upgrade, read the Rust SDK 2.x to 3.0 migration guide.Version 2 of the Rust SDK makes the
rustls dependency optional. There are no changes to the SDK API.Overview
This topic documents how to get started with the server-side Rust SDK, and links to reference information on all of the supported features.LaunchDarkly’s SDKs are open source. In addition to this reference guide, we provide source, API reference documentation, and a sample application:
| Resource | Location |
|---|---|
| SDK API documentation | SDK API docs |
| Supported SDK Versions | Rust server SDK |
| GitHub repository | rust-server-sdk |
| Sample application | Rust |
| Published module | crates.io |
Get started
After you complete the Get started process, follow these instructions to start using the LaunchDarkly SDK in your Rust application.Install the SDK
First, install the LaunchDarkly SDK as a dependency in your application.Initialize the client
Next, import the LaunchDarkly client in your application code:The Rust SDK uses an SDK key. Keys are specific to each project and environment. They are available from Project settings, on the Environments list. To learn more about key types, read Keys.
client.
Here’s how:
Config.
Evaluate a context
You can useclient to check which variation a particular context will receive for a given feature flag.
Here’s how:
Shut down the client
Shut down the client when your application terminates. To learn more, read Shutting down.Supported features
This SDK supports the following features:- Anonymous contexts and users
- Configuration, including
- Context configuration
- Evaluating flags
- Flag evaluation reasons
- Flushing events
- Getting all flags
- Identifying and changing contexts
- Logging configuration
- Migrations
- Offline mode
- Private attributes
- Relay Proxy configuration
- Secure mode
- Sending custom events
- Service endpoint configuration
- Shutting down
- Test data sources
- Web proxy configuration