ptools 0.2.6

Utilities for inspecting Linux processes
[package]
name = "ptools"
version = "0.2.6"
edition = "2021"
description = "Utilities for inspecting Linux processes"
readme = "README.md"
homepage = "https://github.com/basil/ptools"
repository = "https://github.com/basil/ptools"
license = "Apache-2.0"
keywords = ["linux", "process", "procfs", "debugging", "cli"]
categories = ["command-line-utilities", "development-tools::debugging"]

[dependencies]
clap = { version = "4.5", features = ["derive"] }
nix = { version = "0.31", features = ["event", "fs", "process", "signal", "socket"] }

[build-dependencies]
clap = { version = "4.5", features = ["derive"] }
clap_mangen = "0.2.31"

[profile.release]
opt-level = "z" # favors smaller codegen than the default (3)
lto = true # tends to produce the smallest binaries (tradeoff: slower builds)
codegen-units = 1 # tends to produce the smallest binaries (tradeoff: slower builds)
panic = "abort" # removes unwinding; for a CLI this is usually fine
debug = 1 # keeps line-tables-only debuginfo, making backtraces/profiles meaningful without the full size hit
strip = "symbols" # strips symbol table to reduce size, while still leaving enough info for basic stack traces with debug = 1
# TODO is there any way to remove the ability to display backtraces? This would
# likely shave another 50K or so off the binary size, and may not be necessary
# if systems are typically configured to dump core on SIGABRT

[package.metadata.deb]
maintainer = "Basil Crow"
section = "debug"
copyright = "2026 Basil Crow"

extended-description = """\
A collection of utilities for inspecting the state of processes, modeled \
after the tools by the same name which exist on Solaris/illumos."""

separate-debug-symbols = true
assets = [
  # List files we want explicitly so that we don't get the binaries intended for
  # testing.
  ["target/release/pargs", "usr/bin/", "755"],
  ["target/release/penv", "usr/bin/", "755"],
  ["target/release/pflags", "usr/bin/", "755"],
  ["target/release/pfiles", "usr/bin/", "755"],
  ["target/release/prun", "usr/bin/", "755"],
  ["target/release/psig", "usr/bin/", "755"],
  ["target/release/pstop", "usr/bin/", "755"],
  ["target/release/ptree", "usr/bin/", "755"],
  ["target/release/pwait", "usr/bin/", "755"],
  ["target/man/pargs.1", "usr/share/man/man1/pargs.1", "644"],
  ["target/man/penv.1", "usr/share/man/man1/penv.1", "644"],
  ["target/man/pflags.1", "usr/share/man/man1/pflags.1", "644"],
  ["target/man/pfiles.1", "usr/share/man/man1/pfiles.1", "644"],
  ["target/man/prun.1", "usr/share/man/man1/prun.1", "644"],
  ["target/man/psig.1", "usr/share/man/man1/psig.1", "644"],
  ["target/man/pstop.1", "usr/share/man/man1/pstop.1", "644"],
  ["target/man/ptree.1", "usr/share/man/man1/ptree.1", "644"],
  ["target/man/pwait.1", "usr/share/man/man1/pwait.1", "644"],
]

[package.metadata.generate-rpm]
vendor = "Basil Crow"
packager = "Basil Crow"
assets = [
  { source = "target/release/pargs", dest = "/usr/bin/pargs", mode = "755" },
  { source = "target/release/penv", dest = "/usr/bin/penv", mode = "755" },
  { source = "target/release/pflags", dest = "/usr/bin/pflags", mode = "755" },
  { source = "target/release/pfiles", dest = "/usr/bin/pfiles", mode = "755" },
  { source = "target/release/prun", dest = "/usr/bin/prun", mode = "755" },
  { source = "target/release/psig", dest = "/usr/bin/psig", mode = "755" },
  { source = "target/release/pstop", dest = "/usr/bin/pstop", mode = "755" },
  { source = "target/release/ptree", dest = "/usr/bin/ptree", mode = "755" },
  { source = "target/release/pwait", dest = "/usr/bin/pwait", mode = "755" },
  { source = "target/man/pargs.1", dest = "/usr/share/man/man1/pargs.1", mode = "644" },
  { source = "target/man/penv.1", dest = "/usr/share/man/man1/penv.1", mode = "644" },
  { source = "target/man/pflags.1", dest = "/usr/share/man/man1/pflags.1", mode = "644" },
  { source = "target/man/pfiles.1", dest = "/usr/share/man/man1/pfiles.1", mode = "644" },
  { source = "target/man/prun.1", dest = "/usr/share/man/man1/prun.1", mode = "644" },
  { source = "target/man/psig.1", dest = "/usr/share/man/man1/psig.1", mode = "644" },
  { source = "target/man/pstop.1", dest = "/usr/share/man/man1/pstop.1", mode = "644" },
  { source = "target/man/ptree.1", dest = "/usr/share/man/man1/ptree.1", mode = "644" },
  { source = "target/man/pwait.1", dest = "/usr/share/man/man1/pwait.1", mode = "644" },
]