# 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.93"
name = "all-smi"
version = "0.22.0"
authors = ["Jeongkyu Shin <inureyes@gmail.com>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Command-line utility for monitoring GPU hardware. It provides a real-time view of GPU utilization, memory usage, temperature, power consumption, and other metrics."
readme = "README.md"
keywords = [
    "cli",
    "rust",
]
categories = ["command-line-utilities"]
license = "Apache-2.0"
repository = "https://github.com/lablup/all-smi"

[features]
cli = [
    "dep:clap",
    "dep:crossterm",
    "dep:axum",
    "dep:tower-http",
    "dep:anyhow",
    "dep:toml",
    "dep:dirs",
]
default = ["cli"]
furiosa = ["furiosa-smi-rs"]
level_zero = []
mock = [
    "cli",
    "dep:rand",
    "dep:hyper",
    "dep:hyper-util",
]

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

[[bin]]
name = "all-smi"
path = "src/main.rs"
required-features = ["cli"]

[[bin]]
name = "all-smi-mock-server"
path = "src/bin/all-smi-mock-server.rs"
required-features = ["mock"]

[[bin]]
name = "debug-pid-mapping"
path = "src/bin/debug-pid-mapping.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.anyhow]
version = "1.0.100"
optional = true

[dependencies.async-trait]
version = "0.1"

[dependencies.axum]
version = "0.8.9"
optional = true

[dependencies.chrono]
version = "0.4.44"

[dependencies.clap]
version = "4.6.1"
features = ["derive"]
optional = true

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

[dependencies.dirs]
version = "6"
optional = true

[dependencies.flate2]
version = "1"

[dependencies.futures-util]
version = "0.3.31"

[dependencies.hyper]
version = "1.9.0"
features = ["full"]
optional = true

[dependencies.hyper-util]
version = "0.1.18"
features = ["full"]
optional = true

[dependencies.libc]
version = "0.2"

[dependencies.num_cpus]
version = "1.17"

[dependencies.nvml-wrapper]
version = "0.12.1"

[dependencies.once_cell]
version = "1.21.3"

[dependencies.prost]
version = "0.14"

[dependencies.prost-types]
version = "0.14"

[dependencies.rand]
version = "0.10"
optional = true

[dependencies.regex]
version = "1.12.2"

[dependencies.reqwest]
version = "0.13"
features = ["json"]

[dependencies.russh]
version = "0.61"

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

[dependencies.serde_json]
version = "1.0"

[dependencies.sysinfo]
version = "0.38"

[dependencies.tar]
version = "0.4.46"

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1.52.3"
features = ["full"]

[dependencies.toml]
version = "1"
optional = true

[dependencies.tonic]
version = "0.14"

[dependencies.tonic-prost]
version = "0.14"

[dependencies.tower-http]
version = "0.6.11"
features = [
    "cors",
    "trace",
]
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-subscriber]
version = "0.3.20"
features = ["env-filter"]

[dependencies.url]
version = "2.5"

[dependencies.whoami]
version = "2"

[dependencies.zstd]
version = "0.13"

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

[dev-dependencies.tokio]
version = "1.52.3"
features = [
    "full",
    "test-util",
]

[build-dependencies.tonic-prost-build]
version = "0.14"

[target.'cfg(all(target_arch = "aarch64", target_env = "gnu"))'.dependencies.openssl]
version = "0.10.80"
features = ["vendored"]

[target.'cfg(all(target_os = "linux", not(target_env = "musl")))'.dependencies.libamdgpu_top]
version = "=0.11.5"

[target.'cfg(target_env = "musl")'.dependencies.openssl]
version = "0.10.80"
features = ["vendored"]

[target.'cfg(target_os = "linux")'.dependencies.all-smi-luwen-core]
version = "0.2.0"

[target.'cfg(target_os = "linux")'.dependencies.all-smi-luwen-if]
version = "0.7.9"

[target.'cfg(target_os = "linux")'.dependencies.all-smi-luwen-ref]
version = "0.7.9"

[target.'cfg(target_os = "linux")'.dependencies.all-smi-ttkmd-if]
version = "0.2.2"

[target.'cfg(target_os = "linux")'.dependencies.cgroups-rs]
version = "0.5.0"

[target.'cfg(target_os = "linux")'.dependencies.furiosa-smi-rs]
version = "2025.3.0"
optional = true

[target.'cfg(target_os = "linux")'.dependencies.libloading]
version = "0.9"

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

[target.'cfg(target_os = "windows")'.dependencies.libloading]
version = "0.9"

[target.'cfg(target_os = "windows")'.dependencies.wmi]
version = "0.18"

[lints.clippy]
bool_comparison = "warn"
manual_range_contains = "warn"
module_inception = "warn"
needless_return = "warn"
redundant_closure = "warn"
uninlined_format_args = "warn"

[lints.rust]
missing_docs = "allow"
unsafe_code = "allow"

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