[package]
edition = "2024"
rust-version = "1.88"
name = "hypomnesis"
version = "0.2.1"
authors = ["Eric Jacopin"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "External RAM and VRAM measurement for Rust processes (process RSS plus per-process and device-wide GPU memory: Windows DXGI + NVML, Linux NVML, with nvidia-smi fallback)."
homepage = "https://github.com/PCfVW/hypomnesis"
documentation = "https://docs.rs/hypomnesis"
readme = "README.md"
keywords = [
"memory",
"vram",
"nvml",
"dxgi",
"gpu",
]
categories = [
"os",
"memory-management",
"hardware-support",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/PCfVW/hypomnesis"
[package.metadata.docs.rs]
all-features = true
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
]
[features]
cli = ["dep:clap"]
debug-output = []
default = [
"nvml",
"nvidia-smi-fallback",
"dxgi",
]
dxgi = ["dep:windows"]
nvidia-smi-fallback = []
nvml = ["dep:libloading"]
report = []
test-helpers = []
[lib]
name = "hypomnesis"
path = "src/lib.rs"
[[bin]]
name = "hmn"
path = "src/bin/hmn.rs"
required-features = ["cli"]
[[example]]
name = "print_demo"
path = "examples/print_demo.rs"
required-features = ["report"]
[[test]]
name = "live_gpu"
path = "tests/live_gpu.rs"
[[test]]
name = "smoke"
path = "tests/smoke.rs"
[dependencies.clap]
version = "4"
features = ["derive"]
optional = true
[dependencies.libloading]
version = "0.9"
optional = true
[dependencies.thiserror]
version = "2"
[target."cfg(windows)".dependencies.windows]
version = "0.62"
features = [
"Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common",
]
optional = true
[lints.clippy]
as_conversions = "warn"
cast_possible_truncation = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
exhaustive_enums = "warn"
expect_used = "deny"
explicit_iter_loop = "warn"
indexing_slicing = "deny"
manual_filter_map = "warn"
manual_find_map = "warn"
match_wildcard_for_single_variants = "deny"
missing_docs_in_private_items = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
module_name_repetitions = "allow"
must_use_candidate = "warn"
needless_range_loop = "warn"
panic = "deny"
too_many_lines = "allow"
unwrap_used = "deny"
wildcard_enum_match_arm = "deny"
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
elided_lifetimes_in_paths = "deny"
missing_docs = "warn"
[profile.dev]
opt-level = 1
[profile.release]
opt-level = 3
lto = true
codegen-units = 1