cargo2nix

Community

Per-crate Rust builds in Nix.

Authorolafkfreund
Version1.0.0
Installs0

System Documentation

What problem does it solve?

cargo2nix helps Rust projects achieve reproducible builds by generating Cargo.nix files that describe per-crate derivations, enabling fine-grained caching and flexible toolchain control.

Core Features & Use Cases

  • Per-crate derivations for selective rebuilding and sharing dependencies across projects.
  • Workspace and multi-binary support with cross-compilation and development shells.
  • Easy integration with Flakes and cargo workflows to keep Cargo.nix in sync with Cargo.lock.

Quick Start

  • Generate Cargo.nix for your project with: nix run github:cargo2nix/cargo2nix
  • Update after changing Cargo.lock: cargo update; nix run github:cargo2nix/cargo2nix; git add Cargo.lock Cargo.nix

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cargo2nix
Download link: https://github.com/olafkfreund/nixos_config/archive/main.zip#cargo2nix

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.