Skip to content

Conversation

@dmarticus
Copy link

@dmarticus dmarticus commented Sep 18, 2025

Summary

This PR adds comprehensive feature flag support to the PostHog Rust SDK

Key features:

  • Full feature flag support (boolean, multivariate, payloads)
  • Local evaluation with background polling for cached flag definitions
  • Advanced configuration options via ClientOptionsBuilder
  • Support for both async and blocking clients
  • Property-based targeting and batch evaluation

Major additions:

  • feature_flags.rs: Core feature flag evaluation logic
  • local_evaluation.rs: Local caching and evaluation system
  • endpoints.rs: PostHog API endpoint definitions
  • Comprehensive examples demonstrating all flag patterns
  • Full test coverage for async/blocking/local evaluation modes

@dmarticus dmarticus changed the title initial commit feat(flags): Add feature flags with local evaluation support to posthog-rs Sep 18, 2025
@dmarticus dmarticus changed the title feat(flags): Add feature flags with local evaluation support to posthog-rs feat(flags): Add feature flags with local evaluation support Sep 18, 2025
use serde_json::json;

#[cfg(feature = "async-client")]
#[tokio::main]

Check failure

Code scanning / CodeQL

Cleartext logging of sensitive information High

This operation writes
user_id
to a log file.
This operation writes
user_id
to a log file.
This operation writes
user_id
to a log file.
This operation writes
user_id
to a log file.
);

match client
.get(&url)

Check failure

Code scanning / CodeQL

Cleartext transmission of sensitive information High

This 'get' operation transmits data which may contain unencrypted sensitive data from
config.project_api_key
.
);

match client
.get(&url)

Check failure

Code scanning / CodeQL

Cleartext transmission of sensitive information High

This 'get' operation transmits data which may contain unencrypted sensitive data from
config.project_api_key
.

let response = self
.client
.get(&url)

Check failure

Code scanning / CodeQL

Cleartext transmission of sensitive information High

This 'get' operation transmits data which may contain unencrypted sensitive data from
... .project_api_key
.

let response = self
.client
.get(&url)

Check failure

Code scanning / CodeQL

Cleartext transmission of sensitive information High

This 'get' operation transmits data which may contain unencrypted sensitive data from
... .project_api_key
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant