yusdacra / nix-cargo-integration

Library to easily and effortlessly integrate Cargo projects with Nix.
https://flake.parts/options/nix-cargo-integration.html
MIT License
183 stars 19 forks source link

Cross compilation support #5

Open yusdacra opened 3 years ago

bobbbay commented 2 years ago

Any update on this? This flake is awesome, but cross-compilation is pretty important for some projects :).

yusdacra commented 2 years ago

Hey, thanks for the interest. I intend to work on this, but currently I'm working on dream2nix so that I can use it in nix-cargo-integration (#49). dream2nix currently doesn't implement support for cross-compilation, but when it does it would mean that nix-cargo-integration essentially gets it for free.

a-kenji commented 2 years ago

Does dream2nix still doesn't support cross-compilation?

blm768 commented 1 year ago

I got cross-compilation working on this commit by basically just setting targets in rust-toolchain.toml], but since the migration to flake-parts, it doesn't seem to be quite that simple.

yusdacra commented 1 year ago

I got cross-compilation working on this commit by basically just setting targets in rust-toolchain.toml], but since the migration to flake-parts, it doesn't seem to be quite that simple.

What exactly is the problem you are having right now? I've an example in the repo that uses targets as well and it seems to be working fine.

blm768 commented 1 year ago

I was trying to cross-compile for the Raspberry Pi Pico. I must have updated some flake to a bad revision; the current ones let me compile successfully.