Nix API

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2024 Mar 26 12:19
Editor
Edited
Edited
2024 Mar 26 12:21
Refs
Refs

Nix provides a safe alternative to the unsafe APIs exposed by the
libc

// 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<OsString>) pub fn gethostname() -> Result<OsString>;
Nix APIs
 
 
 
 
 
 
 

Recommendations