Back to directory

Naersk

A Nix library that builds Rust projects into Nix derivations directly from Cargo.lock, without extra configuration, code generation or import-from-derivation.

Naersk

Naersk exposes a buildPackage function that turns a Rust project's source directory into a Nix derivation: it parses Cargo.lock, downloads the project's dependencies and compiles the application, taking advantage of Nix's sandboxing and caching. Because all of this parsing happens directly in Nix code rather than through import-from-derivation, Naersk also works with Hydra-based continuous integration.

It can be set up either through Nix flakes, where a flake.nix file next to Cargo.toml calls buildPackage, or through Niv, where a generated default.nix calls the packaged function instead. By default Naersk ignores any rust-toolchain file in a project and uses whichever Rust compiler version is available in nixpkgs, though a project's own toolchain file can be honored instead when that behavior is explicitly configured.

It is released under the MIT license.

More in CI/CD

See all 46
  • Karada.ai

    karada.ai

    A CI/CD platform that auto-compiles existing APIs into Go MCP servers, attaches composable middleware, and exposes them through one gateway usable from Cursor, Claude Code, and Windsurf.

  • EasyActions

    github.com

    A self-hosted web dashboard for running and monitoring GitHub Actions across a whole organization, with GitHub App sign-in, two-factor authentication, and per-org statistics.

  • A GitHub Action that scans pull requests for AI-agent governance gaps, missing audit trails, policy enforcement and human oversight, and posts a compliance report mapped to the EU AI Act, DORA and ISO 42001.