Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

4.0 KB
Raw Blame
[package]
name = "feature-flags"
version = "0.1.0"
edition = "2021"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aho-corasick = { workspace = true }
anyhow = { workspace = true }
arc-swap = { workspace = true }
async-trait = { workspace = true }
aws-config = { workspace = true, optional = true }
aws-sdk-s3 = { workspace = true, optional = true }
axum = { workspace = true }
axum-client-ip = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
chrono-tz = { workspace = true }
clap = { workspace = true, optional = true }
common-cookieless = { path = "../common/cookieless" }
common-database = { path = "../common/database" }
common-kafka = { path = "../common/kafka", optional = true }
common-redis = { path = "../common/redis" }
common-types = { path = "../common/types" }
envconfig = { workspace = true }
governor = { workspace = true }
limiters = { path = "../common/limiters" }
metrics = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
bytes = { workspace = true }
http-body-util = "0.1"
url = "2.5"
once_cell = { workspace = true }
rand = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true, features = ["raw_value"] }
json5 = "1.3"
thiserror = { workspace = true }
sha1 = "0.10.6"
sha2 = "0.10.8"
hex = "0.4.3"
regex.workspace = true
fancy-regex.workspace = true
base64.workspace = true
fernet = { workspace = true }
sqlx = { workspace = true, features = ["rust_decimal"] }
tonic = { workspace = true }
usage-ingestion-proto = { path = "../usage-ingestion-proto" }
uuid = { workspace = true }
common-cache = { path = "../common/cache" }
common-compression = { path = "../common/compression" }
common-hypercache = { path = "../common/hypercache" }
common-s3 = { path = "../common/s3", optional = true }
common-alloc = { path = "../common/alloc" }
common-continuous-profiling = { path = "../common/continuous_profiling" }
strum = { version = "0.28", features = ["derive"] }
lifecycle = { path = "../common/lifecycle" }
common-metrics = { path = "../common/metrics" }
common-geoip = { path = "../common/geoip" }
tower = { workspace = true }
tower-http = { workspace = true }
petgraph = "0.8"
moka = { workspace = true }
dateparser = "0.2.1"
rust_decimal = "1.41.0"
rayon = "1.11.0"
percent-encoding = "2.3.1"
md5 = "0.8"
opentelemetry = { workspace = true }
opentelemetry-otlp = { workspace = true }
opentelemetry_sdk = { workspace = true }
tracing-opentelemetry = { workspace = true }
tokio-retry = "0.3"
serde-pickle = { version = "1.1.1" }
semver = "1.0.28"
subtle = "2.6"
rdkafka = { workspace = true, optional = true }
tokio-util = { workspace = true, optional = true }

[features]
# Gated to keep the AWS SDK, clap, and common-s3 out of library/server builds.
warm-flags-cache = [
  "dep:aws-config",
  "dep:aws-sdk-s3",
  "dep:clap",
  "dep:common-s3",
]

# Gated to keep rdkafka, common-kafka, and the AWS SDK out of the request-path
# server build. The consumer reuses the same hypercache writer + S3 path as the
# warmer, so it pulls the same AWS deps.
flags-cache-builder = [
  "dep:rdkafka",
  "dep:common-kafka",
  "dep:tokio-util",
  "dep:aws-config",
  "dep:aws-sdk-s3",
  "dep:common-s3",
]

[[bin]]
name = "warm-flags-cache"
path = "src/bin/warm-flags-cache.rs"
required-features = ["warm-flags-cache"]

[[bin]]
name = "flags-cache-builder"
path = "src/bin/flags_cache_builder.rs"
required-features = ["flags-cache-builder"]

[lints]
workspace = true

[dev-dependencies]
jsonschema = { version = "0.58", default-features = false }
rstest = "0.26"
assert-json-diff = { workspace = true }
common-s3 = { path = "../common/s3", features = ["mock-client"] }
reqwest = { workspace = true }
futures = "0.3.30"
tempfile = "3"
test-case = "3.3.1"
tokio = { workspace = true, features = ["test-util"] }
tokio-util = { workspace = true }
tokio-stream = "0.1"
metrics-util = { workspace = true }