← Feed
@Ferk@lemmy.ml
2026-10-26 16:00 UTC
Rust? You mean the developers of Rust? That’s not a decision to make by them. Also the Linux distributions include many precompiled binaries. So I don’t see what this point is.
I’m talking about the compiler. ABI compatibility is a non-goal in the compiler itself. You’d need to make a new version of rustc that is more careful when it comes to optimizations.
What distribution includes precompiled libraries (not user programs) in Rust?
If you install a C library like libcurl via apt install, you get a precompiled .so file. If you install a Rust library like librust-serde-dev via Debian’s package manager, you do not get a precompiled binary. If you inspect that package, it is literally just a zip file of raw .rs source code that gets dumped into /usr/share/cargo/registry/.
Putting all libraries into the git repo or using OS package managers to essentially maintain a registry just like cargo’s can work… but it’s duplicated effort in keeping everything well managed, updated, and depending on what manager you use, it might not offer as much flexibility (like how if you need 2 different versions of the same library in Debian, you’ll need workarounds if the maintainers have not created separate versions for it). Also, sometimes some libraries might only need a particular dependency when a particular feature flag is enabled… a package manager most likely would have to download all dependencies of every library you want to use since it does not know what build options you are gonna use when you install the package.
Replies (1)
-
a package manager most likely would have to download all dependencies of every library you want to use since it does not know what build options you are gonna use when you install the package
That’s exactly what is to be avoided. I’m not suggesting a dependency heavy program to compile. Someone making a program without Cargo wouldn’t probably make lot of dependencies, and if any, they are all included in its own repository.
What distribution includes precompiled libraries (not user programs) in Rust?
I thought you was talking about user programs. About the libraries, that’s what I’m suggesting to include too, alongside with the correct rustc compiler. Maybe even the version which the Linux developers use, so that would be the standard one everyone can target.
Open ##5257239