Crate nix

Source
Expand description

Rust friendly bindings to the various *nix system functions.

Modules are structured according to the C header file that they would be defined in.

§Features

Nix uses the following Cargo features to enable optional functionality. They may be enabled in any combination.

  • acct - Process accounting
  • aio - POSIX AIO
  • dir - Stuff relating to directory iteration
  • env - Manipulate environment variables
  • event - Event-driven APIs, like kqueue and epoll
  • fanotify - Linux’s fanotify filesystem events monitoring API
  • feature - Query characteristics of the OS at runtime
  • fs - File system functionality
  • hostname - Get and set the system’s hostname
  • inotify - Linux’s inotify file system notification API
  • ioctl - The ioctl syscall, and wrappers for many specific instances
  • kmod - Load and unload kernel modules
  • mman - Stuff relating to memory management
  • mount - Mount and unmount file systems
  • mqueue - POSIX message queues
  • net - Networking-related functionality
  • personality - Set the process execution domain
  • poll - APIs like poll and select
  • process - Stuff relating to running processes
  • pthread - POSIX threads
  • ptrace - Process tracing and debugging
  • quota - File system quotas
  • reboot - Reboot the system
  • resource - Process resource limits
  • sched - Manipulate process’s scheduling
  • socket - Sockets, whether for networking or local use
  • signal - Send and receive signals to processes
  • term - Terminal control APIs
  • time - Query the operating system’s clocks
  • ucontext - User thread context
  • uio - Vectored I/O
  • user - Stuff relating to users and groups
  • zerocopy - APIs like sendfile and copy_file_range

Re-exports§

pub use libc;

Modules§

errno
Safe wrappers around errno functions
fcntl
file control options
sys
Mostly platform-specific functionality
unistd
Safe wrappers around functions found in libc “unistd.h” header

Traits§

NixPath
Common trait used to represent file system paths by many Nix functions.

Type Aliases§

Error
Nix’s main error type.
Result
Nix Result Type