rust-job-queue-api-worker-system 0.1.0

A production-shaped Rust job queue: Axum API + async workers + Postgres SKIP LOCKED dequeue, retries with decorrelated jitter, idempotency, cooperative cancellation, OpenAPI, Prometheus metrics.
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.88"
name = "rust-job-queue-api-worker-system"
version = "0.1.0"
authors = ["infinityabundance"]
build = false
exclude = [
    "Rust_Job_Queue_API_Worker_System.txt",
    "target/",
    ".github/",
    "docker-compose.yml",
    "Dockerfile",
    ".env.example",
    "bench/*.log",
    "bench/COMPARISON.md",
    "bench/run-comparison.sh",
    "benches/comparison.rs",
    "benches/sqlxmq-migrations/",
]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A production-shaped Rust job queue: Axum API + async workers + Postgres SKIP LOCKED dequeue, retries with decorrelated jitter, idempotency, cooperative cancellation, OpenAPI, Prometheus metrics."
homepage = "https://github.com/infinityabundance/Rust-Job-Queue-API-Worker-System"
documentation = "https://docs.rs/rust-job-queue-api-worker-system"
readme = "README.md"
keywords = [
    "job-queue",
    "background-jobs",
    "postgresql",
    "axum",
    "skip-locked",
]
categories = [
    "asynchronous",
    "database",
    "web-programming::http-server",
]
license = "Apache-2.0"
repository = "https://github.com/infinityabundance/Rust-Job-Queue-API-Worker-System"

[package.metadata.docs.rs]
all-features = true

[features]
api = [
    "dep:axum",
    "dep:tower",
    "dep:tower-http",
    "dep:utoipa-swagger-ui",
    "dep:metrics-exporter-prometheus",
]
default = [
    "api",
    "worker",
]
worker = [
    "dep:tokio-util",
    "dep:metrics-exporter-prometheus",
]

[lib]
name = "rust_job_queue_api_worker_system"
path = "src/lib.rs"

[[bin]]
name = "job-queue-api"
path = "src/bin/job-queue-api.rs"
required-features = ["api"]

[[bin]]
name = "job-queue-migrate"
path = "src/bin/job-queue-migrate.rs"

[[bin]]
name = "job-queue-worker"
path = "src/bin/job-queue-worker.rs"
required-features = ["worker"]

[[example]]
name = "embed_worker"
path = "examples/embed_worker.rs"
required-features = ["worker"]

[[test]]
name = "api_jobs"
path = "tests/api_jobs.rs"

[[test]]
name = "cancel_running"
path = "tests/cancel_running.rs"

[[test]]
name = "concurrency_two_workers"
path = "tests/concurrency_two_workers.rs"

[[test]]
name = "idempotency"
path = "tests/idempotency.rs"

[[test]]
name = "queue_ops"
path = "tests/queue_ops.rs"

[[test]]
name = "retry_and_cancel"
path = "tests/retry_and_cancel.rs"

[[test]]
name = "worker_dequeue"
path = "tests/worker_dequeue.rs"

[[bench]]
name = "dequeue"
path = "benches/dequeue.rs"
harness = false
required-features = ["worker"]

[[bench]]
name = "throughput"
path = "benches/throughput.rs"
harness = false
required-features = ["worker"]

[dependencies.anyhow]
version = "1"

[dependencies.async-trait]
version = "0.1"

[dependencies.axum]
version = "0.8"
optional = true

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.metrics]
version = "0.24"

[dependencies.metrics-exporter-prometheus]
version = "0.18"
features = ["http-listener"]
optional = true
default-features = false

[dependencies.rand]
version = "0.9"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.sqlx]
version = "0.8"
features = [
    "_rt-tokio",
    "uuid",
    "chrono",
    "json",
]
default-features = false
package = "sqlx-core"

[dependencies.sqlx-postgres]
version = "0.8"
features = [
    "uuid",
    "chrono",
    "json",
]
default-features = false

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt-multi-thread",
    "signal",
    "time",
    "sync",
]

[dependencies.tokio-util]
version = "0.7"
features = ["rt"]
optional = true

[dependencies.tower]
version = "0.5"
optional = true

[dependencies.tower-http]
version = "0.6"
features = [
    "trace",
    "request-id",
    "timeout",
    "cors",
    "util",
]
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "json",
]

[dependencies.utoipa]
version = "5"
features = [
    "axum_extras",
    "chrono",
    "uuid",
]

[dependencies.utoipa-swagger-ui]
version = "9"
features = ["axum"]
optional = true

[dependencies.uuid]
version = "1"
features = [
    "v7",
    "serde",
]

[dev-dependencies.criterion]
version = "0.5"
features = ["async_tokio"]

[dev-dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "rustls-tls",
]
default-features = false

[dev-dependencies.testcontainers]
version = "0.27"

[dev-dependencies.testcontainers-modules]
version = "0.15"
features = ["postgres"]

[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"