[package]
name = "launchpadlib"
version = "0.5.7"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/jelmer/launchpadlib-rs"
readme = "README.md"
description = "Rust library for accessing Launchpad.net"
keywords = ["launchpad", "api", "rust"]
categories = ["network-programming", "asynchronous", "api-bindings"]
authors = ["Jelmer Vernooĳ <jelmer@jelmer.uk>"]
build = "build.rs"
include = ["wadl/*.wadl", "src/*.rs", "src/blocking/*.rs", "src/async/*.rs", "src/bin/*.rs", "build.rs", "examples/*.rs", "testdata/*"]

[lib]

[workspace.dependencies]
wadl = { version = "0.5.7", default-features = false }
reqwest = { version = ">=0.12, <0.14", features = ["json", "multipart", "blocking", "form"] }

[dependencies]
chrono = { version = "0.4.41", features = ["serde"] }
debversion = { version = ">=0.4,<0.6", features = ["serde"] }
form_urlencoded = "1.2.1"
lazy_static = "1.5.0"
log = "0.4.27"
mime = "0.3.17"
percent-encoding = "2.3.1"
reqwest = { workspace = true }
rand = "0.9.2"
serde = { version = "1.0.220", features = ["derive"] }
serde_json = "1.0.145"
url = { version = "2.5.4", features = ["serde"] }
wadl = { workspace = true }
clap = { version = "4", features = ["derive"], optional = true }
keyring = { version = "3.6.2", optional = true, features = ["apple-native", "windows-native", "linux-native"] }
async-trait = { version = "0.1", optional = true }
futures = { version = "0.3.31", optional = true }

[build-dependencies]
wadl = { workspace = true, features = ["codegen"] }
reqwest = { workspace = true, features = ["blocking"] }

[dev-dependencies]
maplit = "1.0.2"
tokio = { version = "1.13", features = ["full"] }

[features]
default = ["blocking", "api-v1_0", "bugs", "answers", "blueprints", "code", "translations", "packages"]
api-v1_0 = []
api-devel = []
api-beta = []
cli = ["dep:clap"]
keyring = ["dep:keyring"]
async = ["wadl/async", "dep:async-trait", "dep:futures"]
blocking = ["wadl/blocking"]
# Launchpad pillar features
bugs = []
answers = []
blueprints = []
code = []
translations = []
packages = []
vulnerabilities = []

[[example]]
required-features = ["api-v1_0", "blocking"]
name = "auth"

[[example]]
required-features = ["api-v1_0", "blocking"]
name = "ssh-keys"

[[example]]
required-features = ["api-v1_0", "keyring", "blocking"]
name = "keyring"

[[bin]]
required-features = ["api-v1_0", "cli", "blocking"]
name = "lp-attach"

[[bin]]
required-features = ["api-v1_0", "cli", "blocking"]
name = "lp-set-dupe"

[[bin]]
required-features = ["api-v1_0", "cli", "blocking"]
name = "lp-list-bugs"

[[bin]]
required-features = ["api-v1_0", "cli", "blocking"]
name = "lp-check-membership"

[package.metadata.cargo-all-features]
max_combination_size = 2

skip_feature_sets = [
    [],
    ["async"],
    ["blocking"],
]
