[package]
name = "uv-keyring"
version = "0.0.1"
edition = { workspace = true }

[lib]
doctest = false

[lints]
workspace = true

[features]
default = ["apple-native", "secret-service", "windows-native"]
native-auth = []

## Use the built-in Keychain Services on macOS
apple-native = ["dep:security-framework"]
## Use the secret-service on *nix.
secret-service = ["dep:secret-service"]
## Use the built-in credential store on Windows
windows-native = ["dep:windows-sys", "dep:byteorder"]

[dependencies]
async-trait = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
security-framework = { version = "3", optional = true }

[target.'cfg(any(target_os = "linux",target_os = "freebsd", target_os = "openbsd"))'.dependencies]
secret-service = { version = "5.0.0", features = ["rt-tokio-crypto-rust"], optional = true }

[target.'cfg(target_os = "windows")'.dependencies]
byteorder = { version = "1", optional = true }
windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Security_Credentials"], optional = true }
zeroize = "1.8.1"

[dev-dependencies]
doc-comment = "0.3"
env_logger = "0.11.5"
fastrand = "2"

[package.metadata.docs.rs]
default-target = "x86_64-unknown-linux-gnu"
targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-pc-windows-msvc"]
