support conditional compilation of Nix C APIs

This commit is contained in:
do butterflies cry? 2026-03-27 10:38:56 +10:00
parent 7756365941
commit 1e23515fc1
Signed by: cry
GPG key ID: F68745A836CA0412
12 changed files with 198 additions and 63 deletions

View file

@ -19,14 +19,16 @@ targets = [ "x86_64-unknown-linux-gnu" ]
[lib]
path = "lib.rs"
# NOTE: `[features]` have a 1-1 correspondence to the
# NOTE: shared libraries produced by the Nix C API.
[features]
default = ["util"]
expr = []
fetchers = []
flakes = []
store = []
util = []
gc = []
default = ["nix-util-c"]
nix-util-c = []
nix-store-c = []
nix-expr-c = []
nix-fetchers-c = []
nix-flake-c = []
nix-main-c = []
[build-dependencies]
bindgen = { default-features = false, features = [ "logging", "runtime" ], version = "0.72.1" }