sys-lib 0.5.0

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.
Documentation
# 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.89"
name = "sys-lib"
version = "0.5.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 = ["dep:crypt-io"]
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 = "device_id"
path = "examples/device_id.rs"
required-features = ["device-id"]

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

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

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

[[test]]
name = "alloc"
path = "tests/alloc.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_t1_device"
path = "tests/attack_t1_device.rs"
required-features = ["device-id"]

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

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

[[test]]
name = "container"
path = "tests/container.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.crypt-io]
version = "1.2.2"
features = [
    "std",
    "mac-blake3",
    "zeroize",
]
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_Debug",
    "Win32_System_Diagnostics_ToolHelp",
    "Win32_System_LibraryLoader",
    "Win32_System_Ioctl",
    "Win32_System_JobObjects",
    "Win32_System_Memory",
    "Win32_System_Power",
    "Win32_System_ProcessStatus",
    "Win32_System_Registry",
    "Win32_System_RemoteDesktop",
    "Win32_System_SystemInformation",
    "Win32_System_SystemServices",
    "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"