axodotdev/cargo-dist

Ability to specify feature flags / profile / etc

Gankra opened this issue · 4 comments

The code supports the notion but there's currently no way for the user to provide this information.

I think ideally for something like dist the user should prefer specifying them in the settings (#16) but they should also be allowed on the cli.

The minimal version of this is exposing the obvious flags (and making generate-ci and friends work with them).

The more interesting version of this is if someone wants to have multiple release "variants" of a single application. Like here's the lightweight version, and here's the all-the-bells-and-whistles version.

Are those two different releases? Or are those on the same footing as targets like "windows" vs "macos"? We'll require some kind of label to disambiguate the two releases, presumably the user should provide them..? We can maybe do something decent automatically for "simple" cases like "a single feature flag".

Like you run cargo dist --feature=fancy and you get my_app-v1.0.0-x86_64-pc-windows-msvc-fancy.zip?

Punting on this for MVP, easiest to do this kind of work with someone complaining that we're doing it Wrong so we have some constraints.

It looks like we got this in 0.2.0 - is that right? https://opensource.axo.dev/cargo-dist/book/reference/config.html#features

Gankra commented

good catch, yep!