# nix (Rust)

> Safe Rust bindings to Unix and Linux system APIs

Source: https://talira.ai/catalog/nix-rust-1rk1c0e2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / system bindings](https://talira.ai/categories/libraries/system-bindings), [languages / rust](https://talira.ai/categories/languages/rust)
- Platforms: linux, macos[^2]
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [nix-rust](https://talira.ai/orgs/nix-rust.md)

nix is a Rust crate of friendly, safe bindings to Unix-like system APIs on Linux, macOS, the BSDs and others. Where the [libc](https://talira.ai/catalog/libc-3saddh68.md) crate exposes raw unsafe calls that return error codes, nix wraps them in types that enforce correct use and return Results: gethostname returns an OsString, for example, instead of filling a buffer. It unifies what it can across platforms and keeps platform-specific APIs where they differ, with targets supported in three tiers by how thoroughly CI tests them.

## Links

- GitHub: https://github.com/nix-rust/nix
- Docs: https://docs.rs/nix

## Problems it solves

- call Unix system APIs from Rust without writing unsafe libc code
- fork a process, handle signals or use ptrace safely in a Rust program on Linux
- get proper Result errors instead of errno from system calls in Rust

## Features

- Safe wrappers over Unix system calls that return Result types
- Covers Linux, macOS (Darwin), FreeBSD and other Unix-like targets
- Shared interface where platforms agree, platform-specific APIs where they don't
- Tiered platform support, with tier 1 targets built and tested in CI

## Trust

Overall: 0.58 out of 1.
Signals: maintenance 0.72, adoption 0.70, momentum 0.40, community 1.00, backing 0.30, extensibility 0.00.

- last commit 13 days ago
- 18 commits in the last 90 days
- 3.1k GitHub stars
- 468 contributors
- backed by nix-rust

## Related

- Based on [libc](https://talira.ai/catalog/libc-3saddh68.md)

## Alternatives

- [libc](https://talira.ai/catalog/libc-3saddh68.md): Raw bindings to platform APIs for Rust
- [windows-rs](https://talira.ai/catalog/windows-rs-j2gbtbbw.md): Microsoft's Rust crates for calling Windows APIs, from COM and WinRT to system services and raw bindings

## Sources

[^1]: https://github.com/nix-rust/nix/blob/master/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/nix-rust/nix/blob/master/README.md (checked 28 Nov 2026)
