{"id":17753148,"url":"https://github.com/configcat/rust-sdk","last_synced_at":"2025-12-24T23:13:03.877Z","repository":{"id":244960339,"uuid":"792750573","full_name":"configcat/rust-sdk","owner":"configcat","description":"ConfigCat SDK for Rust. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2025-06-17T10:28:11.000Z","size":254,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-10-02T01:44:57.734Z","etag":null,"topics":["configcat","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","remote-config","rust"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/rust","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-27T13:24:23.000Z","updated_at":"2025-06-17T10:26:17.000Z","dependencies_parsed_at":"2024-06-18T16:48:14.452Z","dependency_job_id":"f13993de-70a0-46eb-819c-ac52933b25c5","html_url":"https://github.com/configcat/rust-sdk","commit_stats":{"total_commits":46,"total_committers":1,"mean_commits":46.0,"dds":0.0,"last_synced_commit":"751fea8ed435cb0010928aaf80c3c3deb45be072"},"previous_names":["configcat/rust-sdk"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/configcat/rust-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Frust-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Frust-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Frust-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Frust-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/rust-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Frust-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28008676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configcat","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","remote-config","rust"],"created_at":"2024-10-26T13:22:52.873Z","updated_at":"2025-12-24T23:13:03.839Z","avatar_url":"https://github.com/configcat.png","language":"Rust","readme":"# ConfigCat SDK for Rust\n\n[![Build Status](https://github.com/configcat/rust-sdk/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/configcat/rust-sdk/actions/workflows/ci.yml)\n[![crates.io](https://img.shields.io/crates/v/configcat.svg?logo=rust)](https://crates.io/crates/configcat)\n[![docs.rs](https://img.shields.io/badge/docs.rs-configcat-66c2a5?logo=docs.rs)](https://docs.rs/configcat)\n\nConfigCat SDK for Rust provides easy integration for your application to [ConfigCat](https://configcat.com).\n\n## Getting started\n\n### 1. Install the package\n\nRun the following Cargo command in your project directory:\n```shell\ncargo add configcat\n```\n\nOr add the following to your `Cargo.toml`:\n\n```toml\n[dependencies]\nconfigcat = \"0.1\"\n```\n\n### 2. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\n![SDK-KEY](https://raw.githubusercontent.com/configcat/rust-sdk/main/media/readme02-3.png  \"SDK-KEY\")\n\n### 3. Import the `configcat` module to your application\n```rust\nuse configcat::*;\n```\n\n### 4. Create a *ConfigCat* client instance\n```rust\nuse configcat::*;\n\n#[tokio::main]\nasync fn main() {\n    let client = Client::new(\"#YOUR-SDK-KEY#\").unwrap();\n}\n```\n\n### 5. Get your setting value\n```rust\nuse configcat::*;\n\n#[tokio::main]\nasync fn main() {\n    let client = Client::new(\"#YOUR-SDK-KEY#\").unwrap();\n\n    let is_awesome_feature_enabled = client.get_value(\"isAwesomeFeatureEnabled\", false, None).await;\n    \n    if is_awesome_feature_enabled {\n        do_the_new_thing();\n    } else {\n        do_the_old_thing();\n    }\n}\n```\n\n## Getting user specific setting values with Targeting\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `User Object` to the `get_value()` function.\n\nRead more about [Targeting here](https://configcat.com/docs/advanced/targeting/).\n\n```rust\nuse configcat::*;\n\n#[tokio::main]\nasync fn main() {\n    let client = Client::new(\"#YOUR-SDK-KEY#\").unwrap();\n\n    let user = User::new(\"#USER-IDENTIFIER#\");\n    let is_awesome_feature_enabled = client.get_value(\"isAwesomeFeatureEnabled\", false, Some(user)).await;\n\n    if is_awesome_feature_enabled {\n        do_the_new_thing();\n    } else {\n        do_the_old_thing();\n    }\n}\n```\n\n## Example\n\nThis repository contains a simple [example application](./examples/print_eval.rs) that you can run with:\n```shell\ncargo run --example print_eval\n```\n\n## Polling Modes\nThe ConfigCat SDK supports 3 different polling mechanisms to acquire the setting values from ConfigCat. After latest setting values are downloaded, they are stored in the internal cache then all requests are served from there. Read more about Polling Modes and how to use them at [ConfigCat Docs](https://configcat.com/docs/sdk-reference/rust).\n\n## Need help?\nhttps://configcat.com/support\n\n## Contributing\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\n\n## About ConfigCat\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"https://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\n\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\n\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)\n- [Documentation](https://configcat.com/docs)\n- [Blog](https://configcat.com/blog)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Frust-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Frust-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Frust-sdk/lists"}