# 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"
name = "qcs-api-client-common"
version = "0.12.9"
build = "build.rs"
publish = ["crates-io"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Common code for QCS API clients"
homepage = "https://github.com/rigetti/qcs-api-client-rust"
readme = "README.md"
keywords = [
    "qcs",
    "quantum",
    "rigetti",
    "api",
]
categories = [
    "api-bindings",
    "authentication",
]
license = "Apache-2.0"
repository = "https://github.com/rigetti/qcs-api-client-rust"

[package.metadata.docs.rs]
features = [
    "python",
    "tracing",
]

[features]
python = [
    "dep:pyo3",
    "dep:pyo3-asyncio",
    "dep:paste",
    "dep:rigetti-pyo3",
    "tokio/macros",
    "pyo3-build-config",
]
tracing = [
    "dep:tracing",
    "urlpattern",
]
tracing-config = ["tracing"]

[lib]
name = "qcs_api_client_common"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

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

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

[dependencies.async-tempfile]
version = "0.7.0"
features = ["uuid"]

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

[dependencies.backoff]
version = "0.4.0"
features = ["tokio"]

[dependencies.derive_builder]
version = "0.20.0"

[dependencies.figment]
version = "0.10.18"
features = [
    "env",
    "toml",
]

[dependencies.futures]
version = "0.3.26"

[dependencies.home]
version = "0.5.5"

[dependencies.http]
version = "1.1"

[dependencies.http-body-util]
version = "0.1.2"

[dependencies.hyper]
version = "1.4.1"
features = ["server"]

[dependencies.hyper-util]
version = "0.1.6"
features = ["client-legacy"]

[dependencies.jsonwebtoken]
version = "9.3.0"

[dependencies.oauth2]
version = "5.0"
features = [
    "reqwest",
    "native-tls",
]
default-features = false

[dependencies.paste]
version = "1.0.15"
optional = true

[dependencies.pyo3]
version = "0.20.3"
features = ["multiple-pymethods"]
optional = true

[dependencies.pyo3-asyncio]
version = "0.20.0"
features = ["tokio-runtime"]
optional = true

[dependencies.reqwest]
version = "0.12.5"
features = [
    "json",
    "rustls-tls-native-roots",
    "socks",
    "rustls-tls-native-roots",
]
default-features = false

[dependencies.rigetti-pyo3]
version = "0.3.6"
optional = true

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

[dependencies.serde_json]
version = "1.0.91"

[dependencies.shellexpand]
version = "3.1.0"
features = ["base-0"]
default-features = false

[dependencies.thiserror]
version = "2.0"

[dependencies.time]
version = "0.3.34"
features = [
    "macros",
    "parsing",
    "serde",
]

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

[dependencies.tokio-util]
version = "0.7"
features = ["net"]

[dependencies.toml]
version = "0.9.8"
features = ["preserve_order"]

[dependencies.toml_edit]
version = "0.23.7"

[dependencies.tracing]
version = "0.1.41"
optional = true

[dependencies.url]
version = "2.3.1"

[dependencies.urlpattern]
version = "0.4.0"
optional = true

[dependencies.webbrowser]
version = "0.8.15"

[dev-dependencies.figment]
version = "0.10.18"
features = [
    "env",
    "toml",
    "test",
]

[dev-dependencies.httpmock]
version = "0.8.0-alpha.1"

[dev-dependencies.oauth2-test-server]
version = "=0.1.2"

[dev-dependencies.rstest]
version = "0.26.0"

[dev-dependencies.serial_test]
version = "3.1.1"

[dev-dependencies.tokio]
version = "1.38.0"
features = [
    "time",
    "fs",
    "macros",
]

[build-dependencies.pyo3-build-config]
version = "0.22.1"
optional = true

[lints.clippy]
all = "deny"
module_name_repetitions = "allow"
redundant_pub_crate = "allow"
unsafe_derive_deserialize = "allow"

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

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

[lints.rust]
absolute_paths_not_starting_with_crate = "warn"
anonymous_parameters = "warn"
bad_style = "warn"
dead_code = "warn"
improper_ctypes = "warn"
keyword_idents = "warn"
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
missing_abi = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
no_mangle_generic_items = "warn"
non_shorthand_field_patterns = "warn"
noop_method_call = "warn"
overflowing_literals = "warn"
path_statements = "warn"
patterns_in_fns_without_body = "warn"
semicolon_in_expressions_from_macros = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unconditional_recursion = "warn"
unreachable_pub = "warn"
unsafe_code = "warn"
unused = "warn"
unused_allocation = "warn"
unused_comparisons = "warn"
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_parens = "warn"
unused_qualifications = "warn"
while_true = "warn"
