Oxidized bindings for the Nix package manager!!
Find a file
John Ericson 92161f300a dev/flake.lock: Update
Flake lock file updates:

• Updated input 'hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/99e03e72e3f7e13506f80ef9ebaedccb929d84d0?narHash=sha256-AavrbMltJKcC2Fx0lfJoZfmy7g87ebXU0ddVenhajLA%3D' (2025-08-15)
  → 'github:hercules-ci/hercules-ci-effects/b0585849abe7d02a774a853f7952d07bb910fd9e?narHash=sha256-jZi%2B9yKmeTMsJ4ZNqRei/wL16%2BQwYGrCl4EJ3QHfoDU%3D' (2025-11-15)
• Updated input 'hercules-ci-effects/flake-parts':
    'github:hercules-ci/flake-parts/af66ad14b28a127c5c0f3bbb298218fc63528a18?narHash=sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8%3D' (2025-08-06)
  → 'github:hercules-ci/flake-parts/52a2caecc898d0b46b2b905f058ccc5081f842da?narHash=sha256-8oNVE8TrD19ulHinjaqONf9QWCKK%2Bw4url56cdStMpM%3D' (2025-11-12)
• Updated input 'hercules-ci-effects/nixpkgs':
    'github:NixOS/nixpkgs/005433b926e16227259a1843015b5b2b7f7d1fc3?narHash=sha256-IVft239Bc8p8Dtvf7UAACMG5P3ZV%2B3/aO28gXpGtMXI%3D' (2025-08-12)
  → 'github:NixOS/nixpkgs/c5ae371f1a6a7fd27823bc500d9390b38c05fa55?narHash=sha256-4PqRErxfe%2B2toFJFgcRKZ0UI9NSIOJa%2B7RXVtBhy4KE%3D' (2025-11-12)
• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/e891a93b193fcaf2fc8012d890dc7f0befe86ec2?narHash=sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs%3D' (2025-08-23)
  → 'github:cachix/pre-commit-hooks.nix/548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c?narHash=sha256-rhSqPNxDVow7OQKi4qS5H8Au0P4S3AYbawBSmJNUtBQ%3D' (2025-12-06)
• Updated input 'pre-commit-hooks-nix/flake-compat':
    'github:edolstra/flake-compat/9100a0f413b0c601e0533d1d94ffd501ce2e7885?narHash=sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX%2BfjA8Xf8PUmqCY%3D' (2025-05-12)
  → 'github:edolstra/flake-compat/f387cd2afec9419c8ee37694406ca490c3f34ee5?narHash=sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4%3D' (2025-10-27)
2025-12-06 15:10:49 -05: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 Clone for Derivation 2025-12-06 13:42:24 -05:00
nix-bindings-util fix(nix-bindings-rust): fix aarch64 abi support 2025-12-06 13:58:00 -05: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-06 15:10:49 -05:00
flake.nix Work around dead code analysis bug 2025-12-06 15:10:49 -05: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.