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 accountingaio- POSIX AIOdir- Stuff relating to directory iterationenv- Manipulate environment variablesevent- Event-driven APIs, likekqueueandepollfeature- Query characteristics of the OS at runtimefs- File system functionalityhostname- Get and set the system’s hostnameinotify- Linux’sinotifyfile system notification APIioctl- Theioctlsyscall, and wrappers for many specific instanceskmod- Load and unload kernel modulesmman- Stuff relating to memory managementmount- Mount and unmount file systemsmqueue- POSIX message queuesnet- Networking-related functionalitypersonality- Set the process execution domainpoll- APIs likepollandselectprocess- Stuff relating to running processespthread- POSIX threadsptrace- Process tracing and debuggingquota- File system quotasreboot- Reboot the systemresource- Process resource limitssched- Manipulate process’s schedulingsocket- Sockets, whether for networking or local usesignal- Send and receive signals to processesterm- Terminal control APIstime- Query the operating system’s clocksucontext- User thread contextuio- Vectored I/Ouser- Stuff relating to users and groupszerocopy- APIs likesendfileandcopy_file_range
Re-exports
pub use libc;
Modules
- dir
dirList directory contents - env
envEnvironment variables - features
featureFeature tests for OS functionality - ifaddrs
netQuery network interface addresses - mount
mountMount file systems - net
netFunctionality involving network interfaces - poll
pollWait for events to trigger on specific file descriptors - pty
termCreate master and slave virtual pseudo-terminals (PTYs) - sched
schedExecution scheduling - Mostly platform-specific functionality
- time
time - Safe wrappers around functions found in libc “unistd.h” header
Macros
- cmsg_space
socketanduioCreate a buffer large enough for storing some control messages as returned byrecvmsg. - ioctl_none
ioctlGenerates a wrapper function for an ioctl that passes no data to the kernel. - ioctl_none_bad
ioctlGenerates a wrapper function for a “bad” ioctl that passes no data to the kernel. - ioctl_read
ioctlGenerates a wrapper function for an ioctl that reads data from the kernel. - ioctl_read_bad
ioctlGenerates a wrapper function for a “bad” ioctl that reads data from the kernel. - ioctl_read_buf
ioctlGenerates a wrapper function for an ioctl that reads an array of elements from the kernel. - ioctl_readwrite
ioctlGenerates a wrapper function for an ioctl that reads and writes data to the kernel. - ioctl_readwrite_bad
ioctlGenerates a wrapper function for a “bad” ioctl that reads and writes data to the kernel. - ioctl_readwrite_buf
ioctlGenerates a wrapper function for an ioctl that reads and writes an array of elements to the kernel. - ioctl_write_buf
ioctlGenerates a wrapper function for an ioctl that writes an array of elements to the kernel. - ioctl_write_int
ioctlGenerates a wrapper function for a ioctl that writes an integer to the kernel. - ioctl_write_int_bad
ioctlGenerates a wrapper function for a “bad” ioctl that writes an integer to the kernel. - ioctl_write_ptr
ioctlGenerates a wrapper function for an ioctl that writes data through a pointer to the kernel. - ioctl_write_ptr_bad
ioctlGenerates a wrapper function for a “bad” ioctl that writes data through a pointer to the kernel. - request_code_none
ioctlGenerate an ioctl request code for a command that passes no data. - request_code_read
ioctlGenerate an ioctl request code for a command that reads. - Generate an ioctl request code for a command that reads and writes.
- request_code_write
ioctlGenerate an ioctl request code for a command that writes. - Generate an ioctl request code for a command that passes an integer
Traits
- Common trait used to represent file system paths by many Nix functions.
Type Aliases
- Nix’s main error type.
- Nix Result Type