nix

Safe, friendly Rust bindings to *nix system APIs, built on top of raw libc calls

Library
Cargo
v0.31.3
3,065stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
47/100Fair
Development Activity16
Maintenance0
Community72
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
71/100Good
Architecture78
Code Quality82
Innovation68
Learning Curve55

nix wraps the low-level, unsafe system calls exposed by the libc crate in safe, idiomatic Rust abstractions for Unix-like operating systems (Linux, macOS/Darwin, the BSDs, and more). Instead of manually managing raw pointers, error codes, and errno, developers get typed Result-returning functions that map closely to POSIX and platform-specific APIs while enforcing Rust’s safety guarantees.

The crate is organized into modules mirroring the C API surface it covers — process and file descriptor management, signal handling, sockets and networking, mounting, pseudo-terminals, polling, and more — gated behind Cargo features so consumers only compile the bindings they actually need. It is one of the most widely depended-upon crates in the Rust ecosystem for anyone writing systems-level or Unix-specific tooling.

What You Get

  • Safe wrappers for process, user/group, and file-descriptor management (unistd, fcntl)
  • Signal handling and process control APIs (sched, spawn, sys::signal)
  • Socket and networking primitives layered over raw sockets (sys::socket, net)
  • Pseudo-terminal (pty), polling (poll), mount, and syslog bindings
  • Fine-grained Cargo feature flags to keep compiled surface area minimal per platform

Common Use Cases

  • Writing Unix-specific system tools (process managers, container runtimes, shells) in Rust
  • Building low-level networking or IPC code that needs raw socket or fd control beyond std
  • Implementing sandboxing, namespaces, or mount-related functionality on Linux
  • Cross-platform system utilities that need per-OS *nix API access with a consistent Rust interface

Under The Hood

Architecture: nix is organized as a set of modules under src/ (unistd.rs, fcntl.rs, sys/, net/, mount/, etc.) that each wrap a coherent slice of the C API — for example unistd.rs exposes over 100 public functions covering fork, exec, pipe, and file descriptor operations, each translating libc’s raw signature and errno-based error reporting into a typed nix::Result<T>. Platform differences are handled via cfg_if!-gated code paths rather than a single unified abstraction, so Linux-only or BSD-only calls are exposed only where they exist, guarded by Cargo features (acct, aio, mount, mqueue, etc.) so downstream crates pay only for the bindings they use.

Tech Stack: The crate targets Rust 2021 edition with an MSRV of 1.69, depends directly on libc for raw FFI declarations, bitflags for flag-based APIs (e.g. open() flags, mount flags), cfg-if for platform conditionals, and optionally pin-utils/memoffset for specific async/mmap-adjacent features. A custom build.rs performs platform capability detection at compile time. There are no heavyweight runtime dependencies — it stays close to the metal by design.

Code Quality: The project has an extensive test suite — 52 test files under test/, organized by subsystem (test_unistd.rs, test_fcntl.rs, test_poll.rs, sys/, mount/, etc.) plus inline unit tests in some source modules, and CI runs across a tiered list of Tier 1/2/3 target platforms with Tier 1 failures blocking merges. A CONTRIBUTING.md and CONVENTIONS.md formalize contribution and style expectations, and a towncrier-based changelog process tracks per-PR changes. With 465 contributors and 3,371 total commits, the codebase reflects long-term, broad-based maintenance rather than a single-author project.

API Design: The library favors small, single-purpose functions with names that mirror their libc counterparts (e.g. gethostname(), fork(), pipe()) so existing C/POSIX knowledge transfers directly, while return types use Rust’s Result and typed wrappers (OsString, RawFd-adjacent types) instead of raw error codes. This keeps the boilerplate for calling a given syscall minimal — often a single function call — at the cost of requiring users to already understand the underlying POSIX semantics, since the crate deliberately doesn’t abstract those away.

Used by 6 apps in this directory

Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,247

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust31%
C21%
Updated today
Rust
87%
MIT

fabro

Developer Tools · Devops

1,516

Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.

View details
81
Repo Health
83
Technical
70
Dependency
Built with
Rust87%
TypeScript11%
Updated yesterday
Rust
72%
Other

iii

Developer Tools · Devops

18,604

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
86
Repo Health
85
Technical
69
Dependency
Built with
Rust72%
TypeScript17%
Updated yesterday
Rust
72%
Apache 2.0

mesh-llm

AI Development · AI Agents

3,258

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
83
Repo Health
91
Technical
70
Dependency
Built with
Rust72%
TypeScript16%
Updated today
TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

89

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
71
Repo Health
76
Technical
71
Dependency
Built with
TypeScript88%
Rust11%
Updated 1 months ago
Go
75%
AGPL 3.0

Teleport

Security · Authentication

20,827

Zero-trust infrastructure access platform that replaces credentials and VPNs with short-lived certificates, SSO, and identity-aware proxies for SSH, Kubernetes, databases, RDP, and AI agents.

View details
95
Repo Health
81
Technical
69
Dependency
Built with
Go75%
TypeScript16%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search