[package]
edition = "2024"
rust-version = "1.89"
name = "sys-lib"
version = "0.3.0"
authors = ["James Gober <me@jamesgober.com>"]
build = false
exclude = [
"/tests/fixtures/",
"/fuzz/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "System facts for Rust services: OS, CPU, memory, disks, network, host, this process, virtualization, power, and device identity, container-aware by default, plus build info, instance info, and a process guard. No subprocesses, zero third-party dependencies."
homepage = "https://github.com/jamesgober/sys-lib"
documentation = "https://docs.rs/sys-lib"
readme = "README.md"
keywords = [
"system",
"hardware",
"cpu",
"memory",
"os",
]
categories = [
"os",
"hardware-support",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/jamesgober/sys-lib"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
"aarch64-apple-darwin",
]
[features]
default = [
"instance",
"guard",
]
device-id = []
guard = ["dep:path-lib"]
instance = [
"dep:clock-lib",
"dep:id-forge",
]
[lib]
name = "sys_lib"
path = "src/lib.rs"
[[example]]
name = "boot"
path = "examples/boot.rs"
required-features = [
"instance",
"guard",
]
[[example]]
name = "facts"
path = "examples/facts.rs"
[[test]]
name = "attack_t10_threads"
path = "tests/attack_t10_threads.rs"
[[test]]
name = "attack_t11_disclosure"
path = "tests/attack_t11_disclosure.rs"
[[test]]
name = "attack_t16_subprocess"
path = "tests/attack_t16_subprocess.rs"
harness = false
[[test]]
name = "attack_t4_environment"
path = "tests/attack_t4_environment.rs"
[[test]]
name = "concurrency"
path = "tests/concurrency.rs"
[[test]]
name = "guard"
path = "tests/guard.rs"
[[test]]
name = "live"
path = "tests/live.rs"
[dependencies.clock-lib]
version = "1.1"
features = ["std"]
optional = true
default-features = false
[dependencies.id-forge]
version = "1.0"
features = ["ulid"]
optional = true
default-features = false
[dependencies.path-lib]
version = "1.0"
optional = true
[dev-dependencies.clock-lib]
version = "1.1"
features = ["std"]
default-features = false
[dev-dependencies.proptest]
version = "1"
features = ["std"]
default-features = false
[target."cfg(unix)".dev-dependencies.libc]
version = "0.2.170"
[target."cfg(windows)".dev-dependencies.windows-sys]
version = "0.61"
features = [
"Win32_Foundation",
"Win32_NetworkManagement_IpHelper",
"Win32_NetworkManagement_Ndis",
"Win32_Networking_WinSock",
"Win32_Security",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_Ioctl",
"Win32_System_JobObjects",
"Win32_System_Power",
"Win32_System_ProcessStatus",
"Win32_System_Registry",
"Win32_System_SystemInformation",
"Win32_System_Threading",
"Win32_System_Time",
"Win32_System_WindowsProgramming",
"Win32_Storage_FileSystem",
]
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(fuzzing)"]
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"