# 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"
name = "grafbase-sdk"
version = "0.22.1"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "An SDK to implement extensions for the Grafbase Gateway"
homepage = "https://grafbase.com"
readme = "README.md"
keywords = ["grafbase"]
license = "MPL-2.0"
repository = "https://github.com/grafbase/grafbase"
resolver = "2"

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

[features]
jq-selection = [
    "dep:jaq-core",
    "dep:jaq-json",
    "dep:jaq-std",
    "dep:hashbrown",
]
test-utils = [
    "dep:duct",
    "dep:fslock",
    "dep:reqwest",
    "dep:tempfile",
    "dep:toml",
    "dep:which",
    "dep:futures-util",
    "dep:graphql-composition",
    "dep:grafbase-sdk-mock",
    "dep:graphql-ws-client",
    "dep:tokio",
    "dep:async-tungstenite",
    "dep:anyhow",
    "dep:regex",
    "dep:itertools",
    "dep:http-body-util",
    "dep:bytes",
    "dep:cynic-introspection",
]

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

[dependencies.anyhow]
version = "1"
optional = true
default-features = false

[dependencies.async-tungstenite]
version = "0.28.0"
features = ["tokio-runtime"]
optional = true

[dependencies.bytes]
version = "1.10.1"
optional = true

[dependencies.chrono]
version = "0.4.40"
default-features = false

[dependencies.cynic-introspection]
version = "3.11"
optional = true

[dependencies.document-features]
version = "0.2"

[dependencies.duct]
version = "1"
optional = true

[dependencies.env_filter]
version = "0.1.3"

[dependencies.fslock]
version = "0.2"
optional = true

[dependencies.futures-util]
version = "0.3.30"
optional = true

[dependencies.fxhash]
version = "0.2"

[dependencies.grafbase-sdk-derive]
version = "0.6.0"

[dependencies.grafbase-sdk-mock]
version = "0.2.0"
optional = true

[dependencies.graphql-composition]
version = "0.10.0"
features = ["grafbase-extensions"]
optional = true

[dependencies.graphql-ws-client]
version = "0.11.1"
features = ["tungstenite"]
optional = true

[dependencies.hashbrown]
version = "0.15"
optional = true

[dependencies.http]
version = "1"

[dependencies.http-body-util]
version = "0.1"
optional = true

[dependencies.itertools]
version = "0.14.0"
optional = true

[dependencies.jaq-core]
version = "2.1.1"
optional = true

[dependencies.jaq-json]
version = "1.1.1"
features = ["serde_json"]
optional = true

[dependencies.jaq-std]
version = "2.1.0"
optional = true

[dependencies.log]
version = "0.4.27"
features = ["kv_unstable_std"]

[dependencies.minicbor-serde]
version = "0.6.0"
features = ["alloc"]

[dependencies.postcard]
version = "1"
features = ["use-std"]

[dependencies.regex]
version = "1.11.1"
optional = true

[dependencies.reqwest]
version = "0.12.15"
features = [
    "http2",
    "rustls-tls",
    "json",
]
optional = true
default-features = false

[dependencies.rust_decimal]
version = "1.37.1"

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

[dependencies.serde_json]
version = "1"

[dependencies.serde_path_to_error]
version = "0.1"

[dependencies.serde_urlencoded]
version = "0.7"

[dependencies.tempfile]
version = "3.16"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.time]
version = "0.3.41"

[dependencies.tokio]
version = "1.44.2"
features = ["net"]
optional = true

[dependencies.toml]
version = "0.9"
optional = true

[dependencies.url]
version = "2"

[dependencies.uuid]
version = "1.16.0"

[dependencies.which]
version = "8"
optional = true

[dependencies.wit-bindgen]
version = "0.43.0"

[dependencies.zerocopy]
version = "0.8.24"
features = ["std"]

[dev-dependencies.insta]
version = "1.42.2"
features = [
    "json",
    "redactions",
    "glob",
]

[build-dependencies.semver]
version = "1"

[lints.clippy]
bool-to-int-with-if = "allow"
cast-possible-truncation = "allow"
default-trait-access = "allow"
derive-partial-eq-without-eq = "allow"
doc-markdown = "allow"
enum-glob-use = "allow"
implicit-hasher = "allow"
into_iter_without_iter = "allow"
items-after-statements = "allow"
iter_without_into_iter = "allow"
large-digit-groups = "allow"
let-underscore-untyped = "allow"
let-with-type-underscore = "allow"
manual-assert = "allow"
map-unwrap-or = "allow"
match-wildcard-for-single-variants = "allow"
missing-errors-doc = "allow"
missing-panics-doc = "allow"
module-name-repetitions = "allow"
must-use-candidate = "allow"
needless-pass-by-value = "allow"
panic = "deny"
redundant-closure-for-method-calls = "allow"
single-match-else = "allow"
struct-excessive-bools = "allow"
struct-field-names = "allow"
too-many-lines = "allow"
unnecessary-fallible-conversions = "allow"
unused-async = "allow"
unused-self = "allow"
wildcard-imports = "allow"

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

[lints.rust]
nonstandard-style = "deny"
rust-2018-idioms = "deny"
