[package]
name = "soft-fido2"
description = "A pure Rust implementation of FIDO2/WebAuthn CTAP 2.0/2.1 protocol"
authors.workspace = true
edition.workspace = true
license-file.workspace = true
readme.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[features]
default = ["std", "usb"]
# Enable standard library (required for transport layers)
std = ["soft-fido2-crypto/std", "soft-fido2-ctap/std", "soft-fido2-transport", "dep:secstr"]
# Enable USB HID transport (requires std and libudev on Linux)
usb = ["std", "soft-fido2-transport/usb"]

[dependencies]
soft-fido2-crypto.workspace = true
soft-fido2-ctap.workspace = true
soft-fido2-transport = { workspace = true, optional = true }
cbor4ii.workspace = true
serde_bytes.workspace = true
p256.workspace = true
rand.workspace = true
serde.workspace = true
sha2.workspace = true
aes.workspace = true
cbc.workspace = true
hmac.workspace = true
hkdf.workspace = true
hex.workspace = true
smallvec.workspace = true
secstr = { version = "0.5", optional = true }

# no_std synchronization primitives
spin.workspace = true

[dev-dependencies]
lazy_static.workspace = true
base64.workspace = true
serial_test.workspace = true
hex.workspace = true
serde_cbor.workspace = true
ciborium.workspace = true
webauthn-rs = "0.5.3"
url = "2.5"
uuid = { version = "1.11", features = ["v4"] }

# Examples
[[example]]
name = "client"

[[example]]
name = "webauthn_flow"

[[example]]
name = "authenticator"

[[example]]
name = "pin_protocol"

[[example]]
name = "credential_management"
