{"id":57146,"library":"nix","title":"Nix","description":"Rust friendly bindings to *nix APIs, providing safe wrappers for system calls.","status":"active","version":"0.31.3","language":"rust","source_language":null,"source_url":"https://github.com/nix-rust/nix","tags":["unix","system-calls","ffi","posix"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nnix = \"0.31.3\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add nix","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"getpid","correct":"use nix::unistd::getpid;"}],"quickstart":{"code":"use nix::unistd::getpid;\n\nfn main() {\n    let pid = getpid();\n    println!(\"Current PID: {}\", pid);\n}","lang":"rust","description":"Shows how to get the current process ID using nix."},"warnings":[{"fix":"Use conditional compilation with #[cfg(unix)] or target only Unix platforms.","message":"Only works on Unix-like systems (Linux, macOS, BSD).","severity":"gotcha","affected_versions":">=0.31.0"}],"env_vars":null,"search_vec":"'api':7 'bind':4 'call':13,17 'ffi':18 'friend':3 'nix':1,6 'posix':19 'provid':8 'rust':2 'safe':9 'system':12,16 'system-cal':15 'unix':14 'wrapper':10","created_at":"2026-06-16T15:30:05.790760+00:00","updated_at":"2026-06-16T15:30:05.790760+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/nix-rust/nix","github":"https://github.com/nix-rust/nix","docs":"https://docs.rs/nix/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking","other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}