feat: Add crate nix-c-raw
See README. Most of this is in accordance with the bindgen introduction. The c_headers function was taken from Zach Mitchell's work on bindings. Co-authored-by: Zach Mitchell <zmitchell@fastmail.com> (cherry picked from commit 83d8ae6b26d341bbd452a77d7361f58c06a2d322)
This commit is contained in:
parent
4dca986fe2
commit
858bec68bc
7 changed files with 517 additions and 0 deletions
12
rust/nix-c-raw/README.md
Normal file
12
rust/nix-c-raw/README.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# nix-c-raw
|
||||
|
||||
This crate contains generated bindings for the Nix C API.
|
||||
**You should not have to use this crate directly,** and so you should probably not add it to your dependencies.
|
||||
Instead, use the `nix-util`, `nix-store` and `nix-expr` crates, which _should_ be sufficient.
|
||||
|
||||
## Design
|
||||
|
||||
Rust bindgen currently does not allow "layered" libraries to be split into separate crates.
|
||||
For example, the expr crate would have all-new types that are distinct and incompatible with the store crate.
|
||||
|
||||
Ideally bindgen will support reusing already generated modules, and we could move the code generation into the appropriate crates, so that the system dependencies of each crate become accurate.
|
||||
Loading…
Add table
Add a link
Reference in a new issue