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
  • 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 my 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§

Modules§

  • Feature tests for OS functionality
  • Mostly platform-specific functionality
  • Safe wrappers around functions found in libc “unistd.h” header

Macros§

  • Create a buffer large enough for storing some control messages as returned by recvmsg.

Traits§

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

Type Aliases§