Proxmox-rs nix backport for loongarch64
Go to file
2016-11-14 21:22:05 +01:00
ci ci: fix docker container check 2016-08-10 19:30:12 -05:00
nix-test test: clean up the test build script 2016-03-05 18:01:09 -06:00
src Make signal argument to kill optional 2016-11-14 21:22:05 +01:00
test Make signal argument to kill optional 2016-11-14 21:22:05 +01:00
.gitignore Test errno defines 2015-02-19 19:30:19 -08:00
.travis.yml ci: drop official support for rustc < 1.7.0 2016-10-24 11:55:01 -05:00
Cargo.toml Remove rustc-version dependency and build script 2016-10-31 10:30:55 -07:00
CHANGELOG.md Make signal argument to kill optional 2016-11-14 21:22:05 +01:00
CONTRIBUTING.md Introduce CHANGELOG.md 2016-07-22 23:42:34 +02:00
CONVENTIONS.md Introduce CHANGELOG.md 2016-07-22 23:42:34 +02: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.7.0 2016-09-09 20:32:45 +02:00
RELEASE_PROCEDURE.md Small fixes to RELEASE_PROCEDURE.md 2016-09-09 21:32:12 +02:00

Rust bindings to *nix APIs

Build Status crates.io

Documentation

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<()>;

Usage

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

[dependencies]
nix = "0.7.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.