[package]
edition = "2024"
rust-version = "1.87"
name = "rs-zero"
version = "0.2.6"
authors = ["Hey"]
build = false
exclude = [
".helloagents/**",
"*.orig",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust-first microservice framework inspired by go-zero engineering practices"
homepage = "https://github.com/tonyher0/rs-zero"
documentation = "https://docs.rs/rs-zero"
readme = "README.md"
keywords = [
"microservice",
"go-zero",
"axum",
"tonic",
"sqlx",
]
categories = [
"web-programming",
"network-programming",
"database",
]
license = "MIT"
repository = "https://github.com/tonyher0/rs-zero"
resolver = "2"
[features]
cache = [
"dep:async-trait",
"dep:serde",
"dep:serde_json",
"dep:thiserror",
"dep:tokio",
]
cache-redis = [
"cache",
"resil",
"dep:redis",
"dep:sha1_smol",
"dep:uuid",
]
core = [
"dep:config",
"dep:serde",
"dep:serde_json",
"dep:thiserror",
"dep:tokio",
"dep:tracing",
"dep:tracing-subscriber",
]
db = [
"dep:sqlx",
"dep:thiserror",
"dep:tokio",
]
db-mysql = [
"db",
"sqlx/mysql",
]
db-postgres = [
"db",
"sqlx/postgres",
]
db-sqlite = [
"db",
"sqlx/sqlite",
]
default = [
"core",
"rest",
"rpc",
"resil",
"cache",
"discovery",
"observability",
"db-sqlite",
]
discovery = [
"dep:async-trait",
"dep:serde",
"dep:serde_json",
"dep:thiserror",
"dep:tokio",
]
discovery-etcd = [
"discovery",
"dep:etcd-client",
]
discovery-kube = [
"discovery",
"dep:kube",
"dep:k8s-openapi",
"dep:tokio-stream",
"k8s-openapi/v1_30",
]
observability = [
"dep:axum",
"dep:http",
"dep:thiserror",
"dep:tokio",
"dep:tracing",
"dep:tracing-subscriber",
]
observability-prometheus-client = [
"observability",
"dep:prometheus-client",
]
otlp = [
"observability",
"dep:opentelemetry",
"dep:opentelemetry_sdk",
"dep:opentelemetry-otlp",
"dep:tracing-opentelemetry",
"dep:tonic",
]
profiling = [
"core",
"dep:pyroscope",
]
resil = [
"dep:thiserror",
"dep:tokio",
]
rest = [
"core",
"dep:axum",
"dep:bytes",
"dep:http",
"dep:jsonwebtoken",
"dep:serde",
"dep:serde_json",
"dep:thiserror",
"dep:tokio",
"dep:tower",
"dep:tower-http",
"dep:tracing",
"dep:uuid",
]
rpc = [
"core",
"dep:futures",
"dep:http",
"dep:http-body",
"dep:thiserror",
"dep:tokio",
"dep:tonic",
"dep:tonic-health",
"dep:tower",
"dep:tracing",
"dep:uuid",
]
[lib]
name = "rs_zero"
path = "src/lib.rs"
[[test]]
name = "api_stability"
path = "tests/api_stability.rs"
[[test]]
name = "cache_integration"
path = "tests/cache_integration.rs"
[[test]]
name = "cache_redis_cluster"
path = "tests/cache_redis_cluster.rs"
[[test]]
name = "cache_redis_degradation"
path = "tests/cache_redis_degradation.rs"
[[test]]
name = "cache_redis_external"
path = "tests/cache_redis_external.rs"
[[test]]
name = "cache_redis_scripts"
path = "tests/cache_redis_scripts.rs"
[[test]]
name = "cache_redis_sharding"
path = "tests/cache_redis_sharding.rs"
[[test]]
name = "cache_resilience_long_running"
path = "tests/cache_resilience_long_running.rs"
[[test]]
name = "cache_stress"
path = "tests/cache_stress.rs"
[[test]]
name = "db_external"
path = "tests/db_external.rs"
[[test]]
name = "db_integration"
path = "tests/db_integration.rs"
[[test]]
name = "discovery_etcd_codec"
path = "tests/discovery_etcd_codec.rs"
[[test]]
name = "discovery_etcd_external"
path = "tests/discovery_etcd_external.rs"
[[test]]
name = "discovery_integration"
path = "tests/discovery_integration.rs"
[[test]]
name = "discovery_kube_external"
path = "tests/discovery_kube_external.rs"
[[test]]
name = "discovery_kube_mapper"
path = "tests/discovery_kube_mapper.rs"
[[test]]
name = "docs_links"
path = "tests/docs_links.rs"
[[test]]
name = "facade_runtime_features"
path = "tests/facade_runtime_features.rs"
[[test]]
name = "logging_integration"
path = "tests/logging_integration.rs"
[[test]]
name = "metrics_stress"
path = "tests/metrics_stress.rs"
[[test]]
name = "observability_integration"
path = "tests/observability_integration.rs"
[[test]]
name = "observability_otlp"
path = "tests/observability_otlp.rs"
[[test]]
name = "observability_otlp_external"
path = "tests/observability_otlp_external.rs"
[[test]]
name = "observability_trace_correlation"
path = "tests/observability_trace_correlation.rs"
[[test]]
name = "profiling_integration"
path = "tests/profiling_integration.rs"
[[test]]
name = "profiling_pyroscope_external"
path = "tests/profiling_pyroscope_external.rs"
[[test]]
name = "redis_limiter_recovery_external"
path = "tests/redis_limiter_recovery_external.rs"
[[test]]
name = "redis_lock"
path = "tests/redis_lock.rs"
[[test]]
name = "redis_lock_external"
path = "tests/redis_lock_external.rs"
[[test]]
name = "resilience_cpu_linux_external"
path = "tests/resilience_cpu_linux_external.rs"
[[test]]
name = "resilience_rest_integration"
path = "tests/resilience_rest_integration.rs"
[[test]]
name = "resilience_rpc_integration"
path = "tests/resilience_rpc_integration.rs"
[[test]]
name = "resilience_stress"
path = "tests/resilience_stress.rs"
[[test]]
name = "rest_integration"
path = "tests/rest_integration.rs"
[[test]]
name = "rpc_integration"
path = "tests/rpc_integration.rs"
[[test]]
name = "rpc_production_integration"
path = "tests/rpc_production_integration.rs"
[[test]]
name = "service_group"
path = "tests/service_group.rs"
[[test]]
name = "service_group_adapters"
path = "tests/service_group_adapters.rs"
[dependencies.async-trait]
version = "0.1"
optional = true
[dependencies.axum]
version = "0.8"
features = ["macros"]
optional = true
[dependencies.bytes]
version = "1"
optional = true
[dependencies.config]
version = "0.15"
optional = true
[dependencies.etcd-client]
version = "0.17"
optional = true
[dependencies.futures]
version = "0.3"
optional = true
[dependencies.http]
version = "1"
optional = true
[dependencies.http-body]
version = "1"
optional = true
[dependencies.jsonwebtoken]
version = "9"
optional = true
[dependencies.k8s-openapi]
version = "0.26"
optional = true
[dependencies.kube]
version = "2"
features = [
"runtime",
"client",
"derive",
]
optional = true
[dependencies.opentelemetry]
version = "0.31"
optional = true
[dependencies.opentelemetry-otlp]
version = "0.31"
features = [
"trace",
"grpc-tonic",
"http-proto",
"reqwest-blocking-client",
]
optional = true
default-features = false
[dependencies.opentelemetry_sdk]
version = "0.31"
optional = true
[dependencies.prometheus-client]
version = "0.24"
optional = true
[dependencies.pyroscope]
version = "2"
features = ["backend-pprof-rs"]
optional = true
[dependencies.redis]
version = "0.32"
features = [
"aio",
"tokio-comp",
"cluster-async",
]
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "1"
optional = true
[dependencies.sha1_smol]
version = "1"
optional = true
[dependencies.sqlx]
version = "0.8"
features = ["runtime-tokio"]
optional = true
default-features = false
[dependencies.thiserror]
version = "2"
optional = true
[dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"signal",
"net",
"time",
"sync",
]
optional = true
[dependencies.tokio-stream]
version = "0.1"
optional = true
[dependencies.tonic]
version = "0.14"
optional = true
[dependencies.tonic-health]
version = "0.14"
optional = true
[dependencies.tower]
version = "0.5"
features = [
"util",
"timeout",
"limit",
]
optional = true
[dependencies.tower-http]
version = "0.6"
features = [
"trace",
"request-id",
"sensitive-headers",
"limit",
]
optional = true
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.tracing-opentelemetry]
version = "0.32"
optional = true
[dependencies.tracing-subscriber]
version = "0.3"
features = [
"env-filter",
"fmt",
"json",
]
optional = true
[dependencies.uuid]
version = "1"
features = [
"v4",
"serde",
]
optional = true
[dev-dependencies.axum]
version = "0.8"
features = ["macros"]
[dev-dependencies.jsonwebtoken]
version = "9"
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.sqlx]
version = "0.8"
features = [
"runtime-tokio",
"sqlite",
"macros",
]
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"signal",
"net",
"time",
"sync",
]
[dev-dependencies.tonic]
version = "0.14"
[dev-dependencies.tonic-health]
version = "0.14"
[dev-dependencies.tower]
version = "0.5"
features = [
"util",
"timeout",
"limit",
]