Proxmox-rs nix backport for loongarch64
Go to file
2016-10-13 21:26:43 -06: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 Merge github.com:nix-rust/nix into evfilt 2016-10-13 21:26:43 -06:00
test Apparently not all mkstemp implementation require the X at the end (despite its documentation\!), checking the failure of a directory now 2016-09-28 07:03:52 +02:00
.gitignore Test errno defines 2015-02-19 19:30:19 -08:00
.travis.yml No longer support Rust 1.1 2016-08-05 21:19:09 +02:00
build.rs Fix raw_pointer_derive warning 2016-04-02 10:20:19 -04:00
Cargo.toml Bump to 0.7.1-pre 2016-09-09 21:28:58 +02:00
CHANGELOG.md Merge github.com:nix-rust/nix into evfilt 2016-10-13 21:26:43 -06: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.