Fabio Valentini wrote:
> - incompatible compile-time options (i.e. resulting in conditional
> compilation): different packages depend on crates with different sets
> of features enabled, sometimes with conflicting options. Even with a
> stable ABI, you'd need to build crates for all necessary combinations
> of configurations, and that matrix quickly explodes (i.e. usually
> exponentially - 2^n builds for for n independent flags). This is a
> deal-breaker for shared libraries in most cases, and also can't be
> solved by using a different compiler. (Unless you want to figure out
> *which* combinations to build, and *only* build these.)

Let me try formulating my criticism more constructively (since my previous 
reply failed both at being polite and at getting my point through, sorry 
again for that):

I am really surprised to read above that Rust apparently allows applications 
to pick the flag with which the libraries they depend on are compiled. I 
really have to wonder why anyone would think that allowing that would be a 
good idea, but then again I guess I know the answer: Whoever added this 
feature was so set in a mindset where everything is compiled on demand and 
statically linked that they figured: why not?

And if you are in that mindset, that actually sounds like a reasonable call 
to make. Source-based software distributions do have the advantage of 
offering this kind of flexibility on demand, see also the USE flags in 
Gentoo. Those are in fact one of the main reasons some people decide to 
compile an entire GNU/Linux distribution from source (and hence pick a 
distribution such as Gentoo) to begin with. Likewise, the Rust way of 
compiling dependencies on demand allows applications to make this kind of 
settings for them.

Still, I can see several issues with that approach, e.g., what if an 
application depends on two libraries A and B that both depend on library C, 
but with conflicting flags? But the main issue is that, as you point out, it 
makes binary distribution of shared libraries highly impractical. That is 
why I think this was a short-sighted design decision.

But we will have to work around this one way or another, because I doubt 
anyone will be willing to remove that questionable feature now that 
developers have come to rely on it. (And no, I do not think the current 
Fedora approach of packaging crates in source form only is the optimal 
approach, for reasons I have already pointed out in other threads on this 
list.)

I hope that the above now brings my point across constructively.

        Kevin Kofler
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to