On Sat, Dec 31, 2022 at 3:48 AM Neal Gompa <ngomp...@gmail.com> wrote:
>
> On Fri, Dec 30, 2022 at 9:37 PM Kevin Kofler via devel
> <devel@lists.fedoraproject.org> wrote:
> >
> > Neal Gompa wrote:
> > > Can we please have gcc-rs also built (even though it's experimental)?
> >
> > Will gcc-rs be able to generate usable shared libraries for Rust crates?
> >
>
> If someone were to spend the time to build the functionality into its
> code generator, sure. I don't think that's high on anyone's list right
> now, though.

rustc can already produce shared libraries - they're just pretty
useless due to two factors:

- lack of stable ABI: for every compiler and dependency update, you'd
need to recompile everything. And unless work on a stable ABI
progresses in upstream Rust, I doubt that gcc-rs can do anything about
this.
- 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.)

Fabio
_______________________________________________
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