Proxmox-rs nix backport for loongarch64
Go to file
2017-04-09 07:41:58 -07:00
ci Removed 'cargo run' directives from ci script. 2017-04-09 07:41:58 -07:00
nix-test Fix a compiler warning on FreeBSD 2017-01-26 20:27:50 -07:00
src add support readlink|readlinkat 2017-03-22 13:33:34 +01:00
test add support readlink|readlinkat 2017-03-22 13:33:34 +01:00
.gitignore Test errno defines 2015-02-19 19:30:19 -08:00
.travis.yml Removed arches. 2017-04-09 07:41:58 -07:00
Cargo.toml Cargo.toml: restore upstream libc remote 2017-03-28 00:30:03 +02:00
CHANGELOG.md add support readlink|readlinkat 2017-03-22 13:33:34 +01:00
CONTRIBUTING.md Introduce CHANGELOG.md 2016-07-22 23:42:34 +02:00
CONVENTIONS.md Update bitflags to 0.7 2017-02-16 16:18:44 +01:00
deploy.sh Automatically deploy docs 2015-02-20 16:27:29 -08:00
LICENSE Add a license file 2015-02-02 10:51:34 -08:00
README.md Release v0.8.0 2017-03-01 23:49:52 -05:00
RELEASE_PROCEDURE.md Get rid of version suffix between versions 2016-11-16 21:57:17 +01:00

Rust bindings to *nix APIs

Build Status crates.io

Documentation (Releases)

Documentation (Development)

Nix seeks to provide friendly bindings to various *nix platform APIs (Linux, Darwin, ...). The goal is to not provide a 100% unified interface, but to unify what can be while still providing platform specific APIs.

For many system APIs, Nix provides a safe alternative to the unsafe APIs exposed by the libc crate. This is done by wrapping the libc functionality with types/abstractions that enforce legal/safe usage.

As an example of what Nix provides, examine the differences between what is exposed by libc and nix for the gethostname system call:

// libc api (unsafe, requires handling return code/errno)
pub unsafe extern fn gethostname(name: *mut c_char, len: size_t) -> c_int;

// nix api (returns a nix::Result)
pub fn gethostname(name: &mut [u8]) -> Result<()>;

Requirements

Rust >= 1.9.0

Usage

To use nix, first add this to your Cargo.toml:

[dependencies]
nix = "0.8.0"

Then, add this to your crate root:

extern crate nix;

Contributing

Contributions are very welcome. Please See CONTRIBUTING for additional details.

License

Nix is licensed under the MIT license. See LICENSE for more details.