[package]
name = "pgqrs"
version.workspace = true
edition.workspace = true
description = "A high-performance PostgreSQL-backed job queue for Rust applications"
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
keywords = ["queue", "postgresql", "async", "workflows", "cli"]
categories = ["command-line-interface"]

readme = "README.md"

include = [
    "migrations/**",
    "src/**",
    "Cargo.toml",
    "README.md",
    "CHANGELOG.md",
]

[[bin]]
name = "pgqrs"
path = "src/main.rs"

[dev-dependencies]
tokio-test = "0.4"
testcontainers = "0.25"
testcontainers-modules = { version = "0.13", features = ["postgres"] }
ctor = "0.2.4"
once_cell = "1.19"

serial_test = "3.2"

[features]
default = ["postgres"]
sqlx = ["dep:sqlx"]
full = ["postgres", "sqlite", "turso"]
postgres = ["sqlx", "sqlx/postgres"]
sqlite = ["sqlx", "sqlx/sqlite"]
# Turso backend (Rust-native logic)
turso = ["dep:turso"]

[dependencies]
sqlx = { version = "0.8.6", features = ["chrono", "uuid", "json", "runtime-tokio-rustls", "macros"], optional = true }
tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "sync", "time"] }

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1.0", features = ["v4", "serde"] }
thiserror = "1.0"
anyhow = "1.0"
pgqrs-macros = { path = "../pgqrs-macros", version = "0.13.0" }
clap = { version = "4.0", features = ["derive"] }
config = "0.15"
tracing = "0.1"
tracing-subscriber = "0.3"
serde_yaml = "0.9"
tabled = "0.20.0"
humantime = "2.1"
async-trait = "0.1"
turso = { version = "0.4.2", optional = true }

# cargo-release configuration for this crate only
# This hook runs once per workspace release (when processing this crate)
[package.metadata.release]
pre-release-hook = ["sh", "-c", "make -C $(git rev-parse --show-toplevel) bump-version VERSION={{version}}"]
