|
|
Subscribe / Log in / New account

stable rust

stable rust

Posted Aug 13, 2024 5:49 UTC (Tue) by tzafrir (subscriber, #11501)
Parent article: COSMIC desktop makes its debut

How stable is rust for a base for this desktop? Can they use rustc from the distribution? Packaged rust crates?


to post comments

stable rust

Posted Aug 13, 2024 8:02 UTC (Tue) by hunger (subscriber, #36242) [Link] (5 responses)

Why is that relevant?

You get self-contained binaries that are statically linked one way or the other.

stable rust

Posted Aug 13, 2024 9:27 UTC (Tue) by tzafrir (subscriber, #11501) [Link] (4 responses)

I looked at the fedora source package they point to for one random package (cosmic-randr). There's a build dependency on "rustc" (no specific version). There doesn't seem no be any build dependency on any specific packaged crate. All crates come from the huge included vendor tarball (that includes a lot of junk).

stable rust

Posted Aug 13, 2024 10:24 UTC (Tue) by hunger (subscriber, #36242) [Link] (3 responses)

Why do you care how the sources of dependencies are shipped?

In the end cargo will download the same SHA from crates.io... either on your system, on the system of somebody vendoring all dependencies into one tarball to ship as part of the package build sources of cosmic-randr or as part of a package for each of the dependencies when those are packaged by the distribution

In all cases the same code will end up in one self-contained, statically linked binary. The user of that binary will not need any of the sources of the dependencies. It really does not matter whether those are packaged or not.

I really see no point whatsoever to package any library crate... they are just source code, nothing more. You do not insist on someone packaging header-only libraries in C or C++ either, do you?

stable rust

Posted Aug 13, 2024 10:50 UTC (Tue) by mbukatov (subscriber, #96216) [Link]

> You do not insist on someone packaging header-only libraries in C or C++ either, do you?

Why not? Fedora does that: https://docs.fedoraproject.org/en-US/packaging-guidelines...

stable rust

Posted Aug 13, 2024 12:40 UTC (Tue) by tzafrir (subscriber, #11501) [Link] (1 responses)

That's a reasonable argument if rust is limited to leaf packages (specifically: executable binaries). What about any other type of shared code? Can it be a distribution package?

A quick search in Debian shows many librust-$foo-dev packages.

stable rust

Posted Aug 13, 2024 15:51 UTC (Tue) by hunger (subscriber, #36242) [Link]

You can build dynamic c-style libraries or binaries... what else is there? Both are leaf nodes from the perspective of the rust ecosystem.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds