# 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 = "2024"
rust-version = "1.96"
name = "gatekeep-sqlx"
version = "0.3.0"
authors = ["Mari"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "SQLx query lowering adapter for gatekeep"
homepage = "https://codeberg.org/plethu/gatekeep"
readme = "README.md"
keywords = [
    "authorization",
    "policy",
    "authz",
    "sqlx",
]
categories = [
    "authentication",
    "database",
]
license = "MIT OR Apache-2.0"
repository = "https://codeberg.org/plethu/gatekeep"

[features]
default = ["postgres"]
mysql = [
    "sqlx/mysql",
    "sqlx/time",
    "sqlx/uuid",
]
mysql-tests = [
    "mysql",
    "sqlx/runtime-tokio",
]
postgres = [
    "sqlx/postgres",
    "sqlx/time",
    "sqlx/uuid",
]
postgres-tests = [
    "postgres",
    "sqlx/runtime-tokio",
]
sqlite = [
    "sqlx/sqlite",
    "sqlx/time",
    "sqlx/uuid",
]
sqlite-tests = [
    "sqlite",
    "sqlx/runtime-tokio",
]

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

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

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

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

[dependencies.gatekeep]
version = "0.3.0"

[dependencies.sqlx]
version = "0.9.0"
features = [
    "time",
    "uuid",
]
default-features = false

[dependencies.thiserror]
version = "2.0.17"

[dev-dependencies.serde]
version = "1.0.228"
features = ["derive"]

[dev-dependencies.tokio]
version = "1.48.0"
features = [
    "macros",
    "rt-multi-thread",
]

[lints.clippy]
dbg_macro = "deny"
expect_used = "deny"
missing_errors_doc = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.cargo]
level = "deny"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "deny"
priority = -1

[lints.rust]
missing_docs = "warn"
unsafe_code = "forbid"
