# 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 = "2021"
rust-version = "1.82"
name = "cyme"
version = "2.2.11"
authors = ["John Whittington <john@jbrengineering.co.uk>"]
build = false
exclude = [
    ".github",
    "scripts",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "List system USB buses and devices. A modern cross-platform lsusb"
readme = "README.md"
keywords = [
    "usb",
    "lsusb",
    "system_profiler",
    "macos",
    "libusb",
]
categories = ["command-line-utilities"]
license = "GPL-3.0-or-later"
repository = "https://github.com/tuna-f1sh/cyme"

[package.metadata.cross.target.arm-unknown-linux-gnueabihf]
pre-build = ["dpkg --add-architecture armhf && apt-get update && apt-get install --assume-yes libusb-1.0-0-dev:armhf libudev-dev:armhf"]

[package.metadata.cross.target.aarch64-unknown-linux-gnu]
pre-build = ["dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes libusb-1.0-0-dev:arm64 libudev-dev:arm64"]

[package.metadata.cross.target.i686-unknown-linux-gnu]
pre-build = ["dpkg --add-architecture i386 && apt-get update && apt-get install --assume-yes libusb-1.0-0-dev:i386 libudev-dev:i386"]

[package.metadata.cross.target.x86_64-unknown-linux-gnu]
pre-build = ["apt-get update && apt-get install --assume-yes libusb-1.0-0-dev libudev-dev"]

[package.metadata.cross.target.aarch64-linux-android]
image = "ghcr.io/cross-rs/aarch64-linux-android:main"

[package.metadata.deb]
section = "utility"
copyright = "2024, John Whittington <john@jbrengineering.co.uk>"
changelog = "CHANGELOG.md"
extended-description = "Profiles system USB buses and the devices on those buses, including full device descriptors. Compatible with lsusb arguments and output whilst adding new features."
assets = [
    [
    "target/release/cyme",
    "usr/bin/",
    "755",
],
    [
    "README.md",
    "usr/share/doc/cyme/README",
    "644",
],
    [
    "doc/cyme.1",
    "/usr/share/man/man1/cyme.1",
    "644",
],
]

[features]
bin = []
cli_generate = [
    "dep:clap_complete",
    "dep:clap_mangen",
]
default = [
    "native",
    "regex_icon",
    "watch",
    "bin",
]
ffi = [
    "libusb",
    "udevlib",
]
libusb = ["dep:rusb"]
native = [
    "nusb",
    "udev",
]
regex_icon = ["dep:regex"]
udev = ["dep:udevrs"]
udev_hwdb = ["udevlib?/hwdb"]
udevlib = ["dep:udevlib"]
usb_test = []
watch = [
    "crossterm",
    "futures-lite",
    "nusb",
    "cansi",
]

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

[[bin]]
name = "cyme"
path = "src/main.rs"

[[example]]
name = "extra_data"
path = "examples/extra_data.rs"

[[example]]
name = "filter_devices"
path = "examples/filter_devices.rs"

[[example]]
name = "print_devices"
path = "examples/print_devices.rs"

[[example]]
name = "walk_sp_data"
path = "examples/walk_sp_data.rs"

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

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

[[bench]]
name = "get"
path = "benches/get.rs"
harness = false

[[bench]]
name = "profile"
path = "benches/profile.rs"
harness = false

[dependencies.cansi]
version = "=2.2.1"
optional = true

[dependencies.chrono]
version = "0.4.39"
features = ["serde"]

[dependencies.clap]
version = "4.0.22"
features = [
    "derive",
    "wrap_help",
]

[dependencies.clap_complete]
version = "4.0.6"
optional = true

[dependencies.clap_mangen]
version = "0.2.5"
optional = true

[dependencies.colored]
version = "3.0.0"

[dependencies.crossterm]
version = "0.28.1"
optional = true

[dependencies.dirs]
version = "6.0.0"

[dependencies.fastrand]
version = "2.1.1"

[dependencies.futures-lite]
version = "2.6.0"
optional = true

[dependencies.heck]
version = "0.4.0"

[dependencies.itertools]
version = "0.10.5"

[dependencies.log]
version = "0.4.17"

[dependencies.nusb]
version = "0.2.1"
optional = true

[dependencies.pci-ids]
version = "0.2.5"

[dependencies.regex]
version = "1.10.5"
optional = true

[dependencies.rusb]
version = "0.9.4"
optional = true

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

[dependencies.serde_json]
version = "1.0.87"

[dependencies.serde_with]
version = "2.0.1"

[dependencies.simple_logger]
version = "4.0.0"
features = ["stderr"]
optional = false

[dependencies.strum]
version = "0.26"

[dependencies.strum_macros]
version = "0.26"

[dependencies.terminal_size]
version = "0.2.5"

[dependencies.unicode-width]
version = "0.2.0"

[dependencies.usb-ids]
version = "1"

[dependencies.uuid]
version = "1.9.1"
features = ["serde"]

[dev-dependencies.assert-json-diff]
version = "2.0.2"

[dev-dependencies.criterion]
version = "0.5.1"

[dev-dependencies.diff]
version = "0.1"

[target.'cfg(target_os="linux")'.dependencies.glob]
version = "0.3.3"

[target.'cfg(target_os="linux")'.dependencies.udevlib]
version = "^0.8.0"
optional = true
package = "udev"

[target.'cfg(target_os="linux")'.dependencies.udevrs]
version = "^0.4.0"
optional = true

[target.'cfg(target_os="macos")'.dependencies.core-foundation]
version = "0.10.1"

[target.'cfg(target_os="macos")'.dependencies.core-foundation-sys]
version = "0.8.4"

[target.'cfg(target_os="macos")'.dependencies.io-kit-sys]
version = "0.4.0"

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true
