mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-14 01:16:17 +02:00
Makes it easier to edit code snippets. Additionally, adds lazy loading to reduce bundle size.
18 lines
369 B
Markdown
18 lines
369 B
Markdown
1\. Install the SDK
|
|
```sh
|
|
cargo add unleash-client
|
|
```
|
|
|
|
2\. Initialize Unleash
|
|
```rust
|
|
let client = client::ClientBuilder::default()
|
|
.interval(500)
|
|
.into_client::<UserFeatures, reqwest::Client>(
|
|
"<YOUR_API_URL>",
|
|
"unleash-onboarding-rust",
|
|
"unleash-onboarding-instance",
|
|
"<YOUR_API_TOKEN>",
|
|
)?;
|
|
client.register().await?;
|
|
```
|