cargo-dist icon indicating copy to clipboard operation
cargo-dist copied to clipboard

Target-specific include

Open cdanger opened this issue 1 year ago • 4 comments

Is it possible to configure cargo dist to include certain files in the windows archive but not in the Linux archive when both Windows and Linux targets are built?

As far as I can see, if I use the include field, it will apply to both archives. How can I make it archive/target specific?

cdanger avatar Jul 14 '24 22:07 cdanger

Apologies for the massive delay, this is a feature we plan to implement once we've shipped our config refactor (referenced on this tracker and in project boards as "config 1.0") - but unfortunately for now it's not possible.

Out of curiosity- what sort of artifacts are you hoping to include?

ashleygwilliams avatar Sep 12 '24 18:09 ashleygwilliams

In the case of Windows built, I have to include a few DLLs (dynamic link libraries), which are not needed for Linux.

cdanger avatar Sep 12 '24 23:09 cdanger

Depending on your usecase you might be able to include an entire directory, and just vary the contents of the directory by platform -- but this would indeed include the directory and not put the DLLs next to your binaries, if that's what you need.

Gankra avatar Sep 16 '24 18:09 Gankra

I need to put them in a separate directory, not next to the binaries. So do you mean I should use like a build.rs to populate the directory with the right content during the build, depending on the target? before I call cargo-dist.

cdanger avatar Sep 26 '24 00:09 cdanger