The nix crate looks great, thanks. I browsed a little bit around nix' code, but I didn't figure out:
How does the wrapping make unsafe code safe? How does Rust know that it's suddenly safe? Is there a language construct which allows one to assert, that a piece of code is now to be considered safe?
Rust doesn't, you assert that the code is safe by wrapping it in an unsafe block. Yes it sounds a bit illogical; try looking at it as a trust_me_i_know_what_im_doing block.