Oxidized bindings for the Nix package manager!!
Find a file
Robert Hensing edf4d62a08
Merge pull request #32 from nixops4/avoid-workspace-references
Dereference workspace lints for nix-cargo-integration compatibility
2025-12-16 03:13:27 +01:00
.vscode dev: Recommend against clangd vscode extension 2025-10-04 02:31:17 +02:00
dev dev: Adjust shell 2025-12-09 23:02:42 +01: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 Dereference workspace lints for nix-cargo-integration compatibility 2025-12-16 03:06:58 +01:00
nix-bindings-fetchers Dereference workspace lints for nix-cargo-integration compatibility 2025-12-16 03:06:58 +01:00
nix-bindings-flake Dereference workspace lints for nix-cargo-integration compatibility 2025-12-16 03:06:58 +01:00
nix-bindings-store Dereference workspace lints for nix-cargo-integration compatibility 2025-12-16 03:06:58 +01:00
nix-bindings-util Dereference workspace lints for nix-cargo-integration compatibility 2025-12-16 03:06:58 +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 Fix clippy and track in CI 2025-12-15 19:48:45 -05:00
flake.lock Bump Nix 2025-12-15 21:04:04 -05:00
flake.nix Fix clippy and track in CI 2025-12-15 19:48:45 -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.