[package]
edition = "2021"
name = "tasker-shared"
version = "0.1.1"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Shared components for tasker orchestration and worker systems"
readme = "README.md"
keywords = [
"async",
"orchestration",
"shared",
"task",
"workflow",
]
categories = [
"asynchronous",
"database",
"web-programming",
]
license = "MIT"
repository = "https://github.com/tasker-systems/tasker-core"
[package.metadata.cargo-machete]
ignored = [
"cargo-llvm-cov",
"tasker-core",
"tokio-test",
"url",
"axum-extra",
"tower",
"tower-http",
"utoipa-swagger-ui",
"prost",
"tokio-stream",
"tonic-build",
"tonic-prost",
"tonic-prost-build",
"crossbeam",
"is-terminal",
"opentelemetry-semantic-conventions",
"rand",
"rust_decimal",
"sysinfo",
"workspace_tools",
]
[features]
benchmarks = ["criterion"]
cache-memcached = ["async-memcached"]
cache-moka = ["moka"]
cache-redis = ["redis"]
default = [
"cache-redis",
"cache-moka",
"grpc-api",
"postgres",
"test-utils",
"web-api",
]
grpc-api = [
"tonic",
"tonic-prost",
"prost",
"prost-types",
"tokio-stream",
]
postgres = ["sqlx/postgres"]
test-cluster = ["test-services"]
test-db = []
test-messaging = ["test-db"]
test-services = [
"test-messaging",
"cache-redis",
]
test-utils = []
tokio-console = ["console-subscriber"]
web-api = [
"axum",
"axum-extra",
"jsonwebtoken",
"rsa",
"tower",
"tower-http",
"utoipa",
"utoipa-swagger-ui",
]
[lib]
name = "tasker_shared"
crate-type = ["rlib"]
path = "src/lib.rs"
[[test]]
name = "config"
path = "tests/config.rs"
[[test]]
name = "config_v2_integration_tests"
path = "tests/config_v2_integration_tests.rs"
[[test]]
name = "constants_test"
path = "tests/constants_test.rs"
[[test]]
name = "database"
path = "tests/database.rs"
[[test]]
name = "database_test"
path = "tests/database_test.rs"
[[test]]
name = "domain_events_test"
path = "tests/domain_events_test.rs"
[[test]]
name = "factory_tests"
path = "tests/factory_tests.rs"
[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"
[[test]]
name = "models"
path = "tests/models.rs"
[[test]]
name = "scope_ordering_test"
path = "tests/scope_ordering_test.rs"
[[test]]
name = "scopes_test"
path = "tests/scopes_test.rs"
[[test]]
name = "sql_function_validation_tests"
path = "tests/sql_function_validation_tests.rs"
[[test]]
name = "sql_functions"
path = "tests/sql_functions.rs"
[[test]]
name = "stale_task_discovery_test"
path = "tests/stale_task_discovery_test.rs"
[[test]]
name = "state_machine"
path = "tests/state_machine.rs"
[[test]]
name = "workflow_step_transition_factory_test"
path = "tests/workflow_step_transition_factory_test.rs"
[[bench]]
name = "event_propagation"
path = "benches/event_propagation.rs"
harness = false
required-features = ["benchmarks"]
[[bench]]
name = "sql_functions"
path = "benches/sql_functions.rs"
harness = false
required-features = ["benchmarks"]
[dependencies.anyhow]
version = "1.0"
[dependencies.async-memcached]
version = "0.6"
optional = true
[dependencies.async-trait]
version = "0.1"
[dependencies.axum]
version = "0.8"
optional = true
[dependencies.axum-extra]
version = "0.12"
features = ["typed-header"]
optional = true
[dependencies.bigdecimal]
version = "0.4"
features = ["serde"]
[dependencies.bon]
version = "3.8"
[dependencies.chrono]
version = "0.4.43"
features = ["serde"]
[dependencies.config]
version = "0.15"
[dependencies.console-subscriber]
version = "0.4"
optional = true
[dependencies.criterion]
version = "0.8.1"
optional = true
[dependencies.crossbeam]
version = "0.8"
[dependencies.derive_more]
version = "2.0.1"
features = [
"as_ref",
"display",
"from",
]
default-features = false
[dependencies.dotenvy]
version = "0.15"
[dependencies.fastrand]
version = "2.0"
[dependencies.futures]
version = "0.3"
[dependencies.is-terminal]
version = "0.4"
[dependencies.jsonschema]
version = "0.40"
[dependencies.jsonwebtoken]
version = "10"
features = ["rust_crypto"]
optional = true
[dependencies.lapin]
version = "3.7"
[dependencies.moka]
version = "0.12"
features = ["future"]
optional = true
[dependencies.opentelemetry]
version = "0.31"
[dependencies.opentelemetry-appender-tracing]
version = "0.31"
[dependencies.opentelemetry-otlp]
version = "0.31"
features = [
"grpc-tonic",
"logs",
]
[dependencies.opentelemetry-prometheus-text-exporter]
version = "0.2"
[dependencies.opentelemetry-semantic-conventions]
version = "0.31"
[dependencies.opentelemetry_sdk]
version = "0.31"
features = [
"metrics",
"rt-tokio",
"trace",
]
[dependencies.pgmq]
version = "0.31.2"
[dependencies.prost]
version = "0.14"
optional = true
[dependencies.prost-types]
version = "0.14"
optional = true
[dependencies.rand]
version = "0.9.1"
[dependencies.redis]
version = "0.27"
features = [
"tokio-comp",
"connection-manager",
]
optional = true
[dependencies.regex]
version = "1.0"
[dependencies.reqwest]
version = "0.12"
features = [
"json",
"rustls-tls",
]
default-features = false
[dependencies.rsa]
version = "0.9"
optional = true
[dependencies.rust_decimal]
version = "1.40"
features = ["serde-with-str"]
[dependencies.serde]
version = "=1.0.228"
features = [
"derive",
"std",
]
[dependencies.serde_json]
version = "1.0"
[dependencies.serde_yaml]
version = "0.9"
[dependencies.sha2]
version = "0.10"
[dependencies.sqlx]
version = "0.8"
features = [
"bigdecimal",
"chrono",
"json",
"macros",
"migrate",
"postgres",
"runtime-tokio-rustls",
"uuid",
]
[dependencies.subtle]
version = "2"
[dependencies.sysinfo]
version = "0.37"
[dependencies.tasker-pgmq]
version = "=0.1.1"
[dependencies.thiserror]
version = "2.0"
[dependencies.tokio]
version = "1.49"
features = ["full"]
[dependencies.tokio-stream]
version = "0.1"
features = ["net"]
optional = true
[dependencies.toml]
version = "0.9"
[dependencies.tonic]
version = "0.14"
optional = true
[dependencies.tonic-prost]
version = "0.14"
optional = true
[dependencies.tower]
version = "0.5"
optional = true
[dependencies.tower-http]
version = "0.6"
features = [
"cors",
"timeout",
"trace",
]
optional = true
[dependencies.tracing]
version = "0.1"
[dependencies.tracing-opentelemetry]
version = "0.32"
[dependencies.tracing-subscriber]
version = "0.3.20"
features = [
"env-filter",
"json",
]
[dependencies.utoipa]
version = "5.4"
features = [
"axum_extras",
"chrono",
"uuid",
]
optional = true
[dependencies.utoipa-swagger-ui]
version = "9.0"
features = ["axum"]
optional = true
[dependencies.uuid]
version = "1.11"
features = [
"serde",
"v4",
"v7",
]
[dependencies.validator]
version = "0.20"
features = ["derive"]
[dependencies.workspace_tools]
version = "0.11.0"
features = ["full"]
[dev-dependencies.cargo-llvm-cov]
version = "0.7"
[dev-dependencies.serial_test]
version = "3.3"
[dev-dependencies.tempfile]
version = "3.24"
[dev-dependencies.tokio-test]
version = "0.4"
[dev-dependencies.url]
version = "2.0"
[build-dependencies.tonic-build]
version = "0.14"
[build-dependencies.tonic-prost-build]
version = "0.14"
[lints.clippy]
dbg_macro = "warn"
module_inception = "allow"
multiple_crate_versions = "allow"
undocumented_unsafe_blocks = "warn"
uninlined_format_args = "allow"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.correctness]
level = "warn"
priority = -1
[lints.clippy.suspicious]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
redundant_imports = "warn"
unsafe_op_in_unsafe_fn = "warn"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(tokio_unstable)"]