# 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.85.0"
name = "qcs-api-client-common"
version = "0.18.1-dev.4"
authors = ["Rigetti QPU Software <qpu-software@rigetti.com>"]
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"
resolver = "2"

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

[features]
_insecure-issuer-validation = []
clap = [
    "dep:clap-stdin",
    "dep:miette",
    "dep:serde_path_to_error",
]
python = [
    "dep:pyo3",
    "dep:pyo3-async-runtimes",
    "dep:pyo3-build-config",
    "dep:rigetti-pyo3",
    "tokio/macros",
]
stubs = [
    "python",
    "dep:pyo3-stub-gen",
    "rigetti-pyo3/stubs",
]
test = ["_insecure-issuer-validation"]
tracing = [
    "dep:tracing",
    "dep:urlpattern",
]
tracing-config = ["tracing"]

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

[[bin]]
name = "stub_gen"
path = "src/bin/stub_gen.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.clap-stdin]
version = "0.8"
optional = true

[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-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.miette]
version = "7"
optional = true

[dependencies.oauth2]
version = "5.0"

[dependencies.optipy]
version = "0.1.0"

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

[dependencies.pyo3-async-runtimes]
version = "0.27.0"
features = [
    "tokio-runtime",
    "tokio-runtime",
]
optional = true

[dependencies.pyo3-stub-gen]
version = "0.17.2"
optional = true

[dependencies.qcs-dependencies-client]
version = "0.3.1"
features = ["http"]

[dependencies.rigetti-pyo3]
version = "0.5.4"
features = ["async-tokio"]
optional = true

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

[dependencies.serde_json]
version = "1.0.91"

[dependencies.serde_path_to_error]
version = "0.1.20"
optional = true

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

[dependencies.thiserror]
version = "2.0"

[dependencies.time]
version = "0.3.47"
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"
optional = true

[dependencies.url]
version = "2.3.1"

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

[dependencies.webbrowser]
version = "1.0.6"

[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.3"

[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.27.2"
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"
