crane
crane copied to clipboard
A Nix library for building cargo projects. Never build twice thanks to incremental artifact caching.
By that I mean running `cargo update -Zminimal-versions` before running tests to ensure that there is no breakage when users use old (but according to semver valid) versions of dependecies....
Rust 1.64 supports declaring cargo dependencies at the workspace level. We should take those into account when vendoring crates https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html
`buildDepsOnly` creates a blank `src/lib.rs` with `mkDummySrc`. This will fail to compile for `#![no_std]` targets such as `thumbv7em-none-eabi` because of the absence of a panic handler. My workaround is to...
I've described my issues with building https://github.com/rusqlite/rusqlite/pull/1010 using crane in detail at https://discourse.nixos.org/t/help-building-rusqlite-for-wasm32-unknown-unknown-with-crane/21724 and created a standalone project at https://github.com/paulyoung/rusqlite-wasm32-unknown-unknown-nix . I'd appreciate it if someone could take a look....
## Motivation https://blog.rust-lang.org/2024/03/11/crates-io-download-changes.html ## Checklist - [ ] added tests to verify new behavior - [ ] added an example template or updated an existing one - [ ] updated...
We've tried to use a dependency in `Cargo.lock` that refers to a git repo with tag that contained `+suffix`, and we got a weird error: ``` pkgs-group-ci-deps> Caused by: pkgs-group-ci-deps>...
## Motivation Currently `toml_edit` is used to resolve `Cargo.toml`s from workspace crates. This was fine but I recently ran into https://github.com/toml-rs/toml/issues/691 which made it impossible for me to compile my...
My situation: I have made modifications to sqlx, they live in [my branch](https://github.com/jelle-bigbridge/sqlx/tree/add-local-infile). sqlx is a workspace project In my own project, I depend on sqlx via git. My own...
Setting a custom `CARGO_TARGET_DIR` breaks `buildDepsOnly` caching. For example if you build deps with `CARGO_TARGET_DIR=target/foo`, then `inheritCargoArtifactsHook` will extract artifacts to `target/foo/foo` so the artifacts will not be picked up....
Crane currently triggers a full rebuild of all dependencies, even when only a single dependency is updated. This behavior significantly impacts development efficiency in large monorepo Cargo projects, where rebuilding...