Registry / networking / nix
library0.31.3rscratesunverified

Rust friendly bindings to *nix APIs, providing safe wrappers for system calls.

# Cargo.toml [dependencies] nix = "0.31.3"
INSTALL
IMPORT
SIG · NIX
N
nix
networkingrustv0.31.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

getpid
use nix::unistd::getpid;

Shows how to get the current process ID using nix.

use nix::unistd::getpid; fn main() { let pid = getpid(); println!("Current PID: {}", pid); }
Debug
Known issues
gotchaOnly works on Unix-like systems (Linux, macOS, BSD).
fix
Use conditional compilation with #[cfg(unix)] or target only Unix platforms.
affects: >=0.31.0
Upgrade
Version history
0.31.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
nix — cargo add nix · libregistry