返回排行榜

ipetkov/crane

Nixcrane.dev

A Nix library for building cargo projects. Never build twice thanks to incremental artifact caching.

nixosnixpkgsnixrustcargocrate
Star 增长趋势
Star
1.4k
Forks
139
周增长
Issues
30
5001k
2023年1月2024年3月2025年5月2026年7月
README

Crane

A Nix library for building cargo projects.

  • Source fetching: automatically done using a Cargo.lock file
  • Incremental: build your workspace dependencies just once, then quickly lint, build, and test changes to your project without slowing down
  • Composable: split builds and tests into granular steps. Gate CI without burdening downstream consumers building from source.

Features

  • Automatic vendoring of dependencies in a way that works with Nix
    • Alternative cargo registries are supported (with a minor configuration change)
    • Git dependencies are automatically supported without additional configuration.
      • Cargo retains the flexibility to only use these dependencies when they are actually needed, without forcing an override for the entire workspace.
  • Reusing dependency artifacts after only building them once
  • clippy checks
  • rustfmt checks
  • cargo-doc generation
  • And support for a number of popular tools such as:

Getting Started

The easiest way to get started is to initialize a flake from a template:

# Start with a comprehensive suite of tests
nix flake init -t github:ipetkov/crane#quick-start

Otherwise check out the examples and templates for more detailed examples. An API Reference is also available.

Compatibility Policy

Breaking changes can land on the master branch at any time, so it is recommended you use a versioning strategy when consuming this library (for example, using something like flakes or niv).

Tagged releases will be cut periodically and changes will be documented in the CHANGELOG. Release versions will follow Semantic Versioning.

The test suite is run against the latest stable nixpkgs release, as well as nixpkgs-unstable. Any breakage on those channels is considered a bug and should be reported as such.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you, shall be licensed as MIT, without any additional terms or conditions.

相关仓库
NixOS/nixpkgs

Nix Packages collection & NixOS

NixMIT Licensenixpkgsnix
25.5k19.6k
nix-community/home-manager

Manage a user environment using Nix [maintainer=@khaneliman, @rycee]

NixMIT Licensenixnixpkgs
nix-community.github.io/home-manager/
10.1k2.4k
xonsh/xonsh

🐚 Python-powered shell. Full-featured, cross-platform and AI-friendly.

PythonPyPIOtherxonshdevops
xon.sh
9.6k730
nix-community/awesome-nix

😎 A curated list of the best resources in the Nix community [maintainer=@cyntheticfox]

Creative Commons Zero v1.0 Universalawesome-listawesome
nix-community.github.io/awesome-nix/
5.3k203
NixOS/nix.dev

Official documentation for getting things done with Nix.

NixCreative Commons Attribution Share Alike 4.0 Internationalnixdocumentation
nix.dev
3.9k334
Misterio77/nix-starter-configs

Simple and documented config templates to help you get started with NixOS + home-manager + flakes. All the boilerplate you need!

NixCreative Commons Zero v1.0 Universaldotfilesflakes
3.8k178
dustinlyons/nixos-config

General purpose Nix starter template for macOS or NixOS w/ step-by-step instructions

NixBSD 3-Clause "New" or "Revised" Licensedotfilesnix
3.6k200
nix-community/nixos-anywhere

Install NixOS everywhere via SSH [maintainers=@Mic92 @Lassulus @phaer @Enzime @a-kenji]

ShellMIT Licensedeploymentnix
nix-community.github.io/nixos-anywhere/
3.3k209
ryan4yin/nixos-and-flakes-book

:hammer_and_wrench: :heart: Want to know NixOS & Flakes in detail? Looking for a beginner-friendly tutorial? Then you've come to the right place! 想要学习使用 NixOS 与 Flakes 吗?在寻找一份新手友好的教程?那你可来对地方了!

TypeScriptnpmCreative Commons Attribution Share Alike 4.0 Internationallinuxnix
nixos-and-flakes.thiscute.world
3.2k156
Mic92/sops-nix

Atomic secret provisioning for NixOS based on sops

NixMIT Licensenixossops
3k223
nix-community/NixOS-WSL

NixOS on WSL [maintainer=@nzbr]

NixApache License 2.0nixoswsl
3k161
nix-community/nh

Yet another Nix CLI helper. [Maintainers=@NotAShelf, @faukah]

Rustcrates.ioEuropean Union Public License 1.2nixosnix
3k120