# 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"
name = "cpdb-rs"
version = "0.1.1"
build = false
exclude = [
    ".github/",
    "target",
    "PRODUCTION_READINESS.md",
    "RELEASE_GOVERNANCE.md",
    "PUBLISHING.md",
    "deny.toml",
    "rustfmt.toml",
    ".gitignore",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Safe Rust bindings for OpenPrinting cpdb-libs — Common Print Dialog Backends"
homepage = "https://openprinting.github.io/"
documentation = "https://docs.rs/cpdb-rs"
readme = "README.md"
keywords = [
    "printing",
    "cups",
    "openprinting",
    "dbus",
    "cpdb",
]
categories = [
    "api-bindings",
    "asynchronous",
    "os::unix-apis",
]
license = "MIT"
repository = "https://github.com/OpenPrinting/cpdb-rs"

[package.metadata.docs.rs]
all-features = false
default-target = "x86_64-unknown-linux-gnu"
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
default = ["zbus-backend"]
ffi = ["dep:cpdb-sys"]
zbus-backend = [
    "dep:zbus",
    "dep:tokio",
    "dep:futures-util",
]

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

[[example]]
name = "cpdb_text_frontend"
path = "examples/cpdb-text-frontend.rs"
required-features = ["ffi"]

[[example]]
name = "discover_printers"
path = "examples/discover_printers.rs"
required-features = ["zbus-backend"]

[[example]]
name = "ffi_basic_usage"
path = "examples/ffi_basic_usage.rs"
required-features = ["ffi"]

[[example]]
name = "ffi_cli_printer_manager"
path = "examples/ffi_cli_printer_manager.rs"
required-features = ["ffi"]

[[example]]
name = "filter_printers"
path = "examples/filter_printers.rs"
required-features = ["zbus-backend"]

[[example]]
name = "get_translations"
path = "examples/get_translations.rs"
required-features = ["zbus-backend"]

[[example]]
name = "print_a_document"
path = "examples/print_a_document.rs"
required-features = ["zbus-backend"]

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

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

[dependencies.cpdb-sys]
version = "0.1.1"
optional = true

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

[dependencies.log]
version = "0.4"

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

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1"
features = [
    "rt",
    "time",
]
optional = true

[dependencies.zbus]
version = "5.15.0"
features = ["tokio"]
optional = true
default-features = false

[dev-dependencies.glib-sys]
version = "0.22"

[dev-dependencies.libc]
version = "0.2"

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.tempfile]
version = "3.27"

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