tasker-shared 0.1.2

Shared components for tasker orchestration and worker systems
[package]
name = "tasker-shared"
version = "0.1.2"
edition = "2021"
description = "Shared components for tasker orchestration and worker systems"
readme = "README.md"
repository = "https://github.com/tasker-systems/tasker-core"
license = "MIT"
keywords = ["async", "orchestration", "shared", "task", "workflow"]
categories = ["asynchronous", "database", "web-programming"]

# docs.rs configuration
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

# TAS-145: Ignore false positives from cargo-machete
[package.metadata.cargo-machete]
ignored = [
  # Dev-dependencies used in tests
  "cargo-llvm-cov",  # CI coverage tool
  "tasker-core",  # Used for test-utils re-export
  "tokio-test",
  "url",
  # Feature-gated dependencies (web-api feature)
  "axum-extra",
  "tower",
  "tower-http",
  "utoipa-swagger-ui",
  # Feature-gated dependencies (grpc-api feature) - used by generated code
  "prost",
  "tokio-stream",
  "tonic-build",
  "tonic-prost",
  "tonic-prost-build",
  # Used via macros or internal APIs
  "crossbeam",
  "is-terminal",
  "opentelemetry-semantic-conventions",
  "rand",
  "rust_decimal",
  "sysinfo",
  "workspace_tools",
]

[lib]
crate-type = ["rlib"]
name = "tasker_shared"

[[bench]]
harness = false
name = "sql_functions"
required-features = ["benchmarks"]

[[bench]]
harness = false
name = "event_propagation"
required-features = ["benchmarks"]

[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
axum = { workspace = true, optional = true }
axum-extra = { workspace = true, optional = true }
bigdecimal = { workspace = true }
bon = { workspace = true }
# Time and date handling
chrono = { workspace = true }
# Configuration
config = { workspace = true }
# Development and testing
criterion = { workspace = true, optional = true }
# dashmap = { workspace = true }
crossbeam = { workspace = true }
derive_more = { workspace = true }
dotenvy = { workspace = true }  # For loading .env files
# Random number generation
fastrand = { workspace = true }
futures = { workspace = true }
is-terminal = { workspace = true }
jsonschema = "0.40"
jsonwebtoken = { workspace = true, optional = true }
# AMQP 0.9.1 client for RabbitMQ (TAS-133d)
lapin = { workspace = true }
opentelemetry = { workspace = true }
opentelemetry-appender-tracing = { workspace = true }
opentelemetry-otlp = { workspace = true }
opentelemetry-prometheus-text-exporter = { workspace = true }
opentelemetry_sdk = { workspace = true }
opentelemetry-semantic-conventions = { workspace = true }
# Message queue management
pgmq = { workspace = true }
tasker-pgmq = { workspace = true }
rand = { workspace = true }
redis = { workspace = true, optional = true }
moka = { workspace = true, optional = true }
async-memcached = { workspace = true, optional = true }
regex = { workspace = true }
# Web API testing and API Integration
reqwest = { workspace = true }
rsa = { workspace = true, optional = true }
rust_decimal = { workspace = true }
# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
# Cryptographic primitives for constant-time API key comparison
sha2 = "0.10"
subtle = "2"
# Database and ORM
sqlx = { workspace = true }
# System information
sysinfo = { workspace = true }
# Error handling
thiserror = { workspace = true }
tokio = { workspace = true }
toml = { workspace = true }
tower = { workspace = true, optional = true }
tower-http = { workspace = true, optional = true }
# Logging and telemetry
tracing = { workspace = true }
tracing-opentelemetry = { workspace = true }
tracing-subscriber = { workspace = true }
# tokio-console async debugging (TAS-158)
# Requires RUSTFLAGS="--cfg tokio_unstable" at compile time
console-subscriber = { version = "0.4", optional = true }
# OpenAPI documentation
utoipa = { workspace = true, optional = true }
utoipa-swagger-ui = { workspace = true, optional = true }
uuid = { workspace = true }
validator = { workspace = true }
workspace_tools = { workspace = true }
# gRPC framework and Protocol Buffers (TAS-177)
tonic = { workspace = true, optional = true }
tonic-prost = { workspace = true, optional = true }
prost = { workspace = true, optional = true }
prost-types = { workspace = true, optional = true }
tokio-stream = { workspace = true, optional = true }

[build-dependencies]
# Proto compilation (TAS-177)
# Note: Requires protobuf to be installed (brew install protobuf)
tonic-build = { workspace = true }
tonic-prost-build = { workspace = true }

[dev-dependencies]
# Coverage tools (used in CI)
cargo-llvm-cov = { workspace = true }
serial_test = { workspace = true }
tasker-core = { package = "tasker-core", path = "../" }
tempfile = { workspace = true }
# Testing tools
tokio-test = { workspace = true }
url = { workspace = true }

[features]
default = ["cache-redis", "cache-moka", "grpc-api", "postgres", "test-utils", "web-api"]
benchmarks = ["criterion"]
cache-redis = ["redis"]
cache-moka = ["moka"]
# TAS-171: Memcached support (not default - opt-in only)
cache-memcached = ["async-memcached"]
postgres = ["sqlx/postgres"]
test-utils = []
# TAS-158: tokio-console async runtime introspection
# Usage: cargo build --features tokio-console
# Requires: RUSTFLAGS="--cfg tokio_unstable" cargo build --features tokio-console
# Then run: tokio-console (in separate terminal)
tokio-console = ["console-subscriber"]
web-api = [
  "axum",
  "axum-extra",
  "jsonwebtoken",
  "rsa",
  "tower",
  "tower-http",
  "utoipa",
  "utoipa-swagger-ui",
]
# TAS-177: gRPC API support
grpc-api = [
  "tonic",
  "tonic-prost",
  "prost",
  "prost-types",
  "tokio-stream",
]

# TAS-73: Test infrastructure levels (cumulative)
# Crate-level tests require at minimum test-messaging (DB + queue)
test-db = []
test-messaging = ["test-db"]
test-services = ["test-messaging", "cache-redis"]
test-cluster = ["test-services"]

[lints]
workspace = true