Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust crane builder rebuilds all dependencies for non-linux targets #506

Open
NickHu opened this issue Apr 18, 2023 · 0 comments
Open

Rust crane builder rebuilds all dependencies for non-linux targets #506

NickHu opened this issue Apr 18, 2023 · 0 comments
Labels
bug Something isn't working rust

Comments

@NickHu
Copy link

NickHu commented Apr 18, 2023

I haven't investigated the exact cause, but when building for anything that isn't my native system (x86_64-unknown-linux-gnu), even though the foo-deps derivation is built and unpacked into the foo build directory, rust will recompile all the dependencies.
I have confirmed this to be the case with at least wasm32-unknown-unknown and x86_64-pc-windows-gnu.

Naersk had the same problem too, which I solved in this PR nix-community/naersk#227.

I have an (untested) hunch that the problem may be as simple as follows: when you specify CARGO_BUILD_TARGET, compile artifacts are stored in e.g. target/x86_64-pc-windows-gnu/debug instead of target/debug. Perhaps the crane builder just needs to account for this.

@yusdacra

@phaer phaer added bug Something isn't working rust labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rust
Projects
None yet
Development

No branches or pull requests

2 participants