Oxidized bindings for the Nix package manager!!
Flake lock file updates:
• Updated input 'nix':
'github:NixOS/nix/525755dadc153c68e5ada8d287ab19af26383fff?narHash=sha256-oMSKV0NFQpfwYQ4wcIIDuH%2B0AwCQl%2BbYRgPznx38i8k%3D' (2025-12-06)
→ 'github:NixOS/nix/7448aedd74e28174bfa33aad0d148c0070c86dfb?narHash=sha256-/Rr90FVpncaSWprG6%2B4t5VXHgDKDvFitzJPpdZgo%2B8I%3D' (2025-12-09)
• Updated input 'nix-cargo-integration':
'github:yusdacra/nix-cargo-integration/0feff946314851edc88b9c783ad7d2dccd49abcc?narHash=sha256-S5k0HAxjq2sbf5BC5DOly66joE08HfiyEJD8v2U3yLc%3D' (2025-12-06)
→ 'github:yusdacra/nix-cargo-integration/92639295bbe953e4c8c32cbffa32dcb0a441118b?narHash=sha256-Ll29VFrT%2BVpnP4HG5LiL33IXuiz6cF2WfTwXONwMj7E%3D' (2025-12-09)
• Updated input 'nix-cargo-integration/dream2nix':
'github:nix-community/dream2nix/ee20942e4524d3458a91108716c847a2d4299d2e?narHash=sha256-4OlkDA0yJyqt5iTX9NqtHNghvkWNzYqmtX7FxDmEXt4%3D' (2025-11-24)
→ 'github:nix-community/dream2nix/83c430ce6b6aedf149c5259f066bfff808722dbd?narHash=sha256-duTz4J4NP1edl/ZBdwZPduPM8j6g0yzjb8YH91T9vU0%3D' (2025-12-08)
• Updated input 'nix-cargo-integration/rust-overlay':
'github:oxalica/rust-overlay/086fd19a68e80fcc8a298e9df4674982e4c498a6?narHash=sha256-FIJtt3Zil89/hLy9i7f0R2xXcJDPc3CeqiiCLfsFV0Y%3D' (2025-12-06)
→ 'github:oxalica/rust-overlay/7b50ad68415ae5be7ee4cc68fa570c420741b644?narHash=sha256-ngar%2ByP06x3%2B2k2Iey29uU0DWx5ur06h3iPBQXlU%2ByI%3D' (2025-12-09)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/f61125a668a320878494449750330ca58b78c557?narHash=sha256-BmPWzogsG2GsXZtlT%2BMTcAWeDK5hkbGRZTeZNW42fwA%3D' (2025-12-05)
→ 'github:NixOS/nixpkgs/addf7cf5f383a3101ecfba091b98d0a1263dc9b8?narHash=sha256-hM20uyap1a0M9d344I692r%2Bik4gTMyj60cQWO%2BhAYP8%3D' (2025-12-08)
|
||
|---|---|---|
| .vscode | ||
| dev | ||
| doc/hacking | ||
| nix-bindings-bindgen-raw | ||
| nix-bindings-expr | ||
| nix-bindings-fetchers | ||
| nix-bindings-flake | ||
| nix-bindings-store | ||
| nix-bindings-util | ||
| .envrc | ||
| .gitignore | ||
| bindgen-gcc.sh | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| nci.nix | ||
| README.md | ||
nix_bindings_* crates
Use the Nix C API from Rust.
Build with nix-cargo-integration
The development environment and building with Nix are taken care of by nix-cargo-integration (options).
The dependency on Nix is taken care of with the nix-bindings-rust flake-parts module.
Example usage:
{
outputs =
inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; }
{
imports = [
inputs.nix-cargo-integration.flakeModule
inputs.nix-bindings-rust.modules.flake.default
];
perSystem = { config, pkgs, ... }: {
# optional:
nix-bindings-rust.nixPackage = pkgs.nix;
nci.projects."myproject" = {
depsDrvConfig = {
imports = [ config.nix-bindings-rust.nciBuildConfig ];
};
};
};
};
}
Hacking
The following will open a shell with dependencies, and install pre-commit for automatic formatting.
$ nix develop
VSCode
rust-analyzer
If the rust-analyzer extension fails, make sure the devShell was loaded into VSCode via Nix Env Selector or direnv.