Oxidized bindings for the Nix package manager!!
Find a file
Robert Hensing 1bb495190a flake.lock: Update
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)
2025-12-09 23:02:32 +01:00
.vscode dev: Recommend against clangd vscode extension 2025-10-04 02:31:17 +02:00
dev dev/flake.lock: Update 2025-12-06 15:10:49 -05:00
doc/hacking maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
nix-bindings-bindgen-raw maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
nix-bindings-expr Format, and keep formatted 2025-12-05 16:55:09 -05:00
nix-bindings-fetchers maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
nix-bindings-flake Format, and keep formatted 2025-12-05 16:55:09 -05:00
nix-bindings-store feat: Enable Nix 2.33 APIs for pre-release testing/validation 2025-12-09 23:02:24 +01:00
nix-bindings-util feat: Enable Nix 2.33 APIs for pre-release testing/validation 2025-12-09 23:02:24 +01:00
.envrc feat: Rust skeleton 2025-09-30 17:57:50 +02:00
.gitignore feat: Rust skeleton 2025-09-30 17:57:50 +02:00
bindgen-gcc.sh maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
Cargo.lock maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
Cargo.toml maint: Move to /rust/* to / 2025-10-26 23:29:13 +01:00
flake.lock flake.lock: Update 2025-12-09 23:02:32 +01:00
flake.nix Merge pull request #18 from numinit/shell-hook 2025-12-09 19:05:51 +01:00
LICENSE License as LGPL-2.1 2025-10-04 02:31:16 +02:00
nci.nix Format, and keep formatted 2025-12-05 16:55:09 -05:00
README.md feat: Expose module for setting up the build and test environment. 2025-10-27 14:52:48 +01:00

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.