Re: Rust packaging guidelines: Remove --all-features suggestion

2025-02-18 Thread David Runge
On 2025-02-18 19:29:41 (+0100), kpcyrd wrote:
> hello,
> 
> following up on an irc discussion on the Rust packaging guideline, I'd like
> to propose changing the command in section 5 from:
> 
> cargo build --frozen --release --all-features
> 
> to
> 
> cargo build --frozen --release
> 
> Enabling all non-default features is rarely what we want, they are usually
> off for a reason and instead features should be explicitly selected and
> enabled, or added to the default feature set by upstream if they are meant
> to be on by default.
> 
> Setting --all-features in many projects (mine included) would enable the
> `vendored` feature that opts you out of system libraries, which is something
> we explicitly don't want.

Yes, I think that is a good idea!

Will you also add some form of note hinting at "you may want to look at the
specific features of the project and potentially enable some selectively" with
an example on how to enable features?

Best,
David

-- 
https://sleepmap.de


signature.asc
Description: PGP signature


Rust packaging guidelines: Remove --all-features suggestion

2025-02-18 Thread kpcyrd

hello,

following up on an irc discussion on the Rust packaging guideline, I'd 
like to propose changing the command in section 5 from:


cargo build --frozen --release --all-features

to

cargo build --frozen --release

Enabling all non-default features is rarely what we want, they are 
usually off for a reason and instead features should be explicitly 
selected and enabled, or added to the default feature set by upstream if 
they are meant to be on by default.


Setting --all-features in many projects (mine included) would enable the 
`vendored` feature that opts you out of system libraries, which is 
something we explicitly don't want.


cheers,
kpcyrd