this post was submitted on 22 Dec 2025
908 points (96.6% liked)
linuxmemes
28573 readers
678 users here now
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
- Understand the difference between a joke and an insult.
- Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
- Don't get baited into back-and-forth insults. We are not animals.
- Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
- Bigotry will not be tolerated.
3. Post Linux-related content
- Including Unix and BSD.
- Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of
sudoin Windows. - No porn, no politics, no trolling or ragebaiting.
- Don't come looking for advice, this is not the right community.
4. No recent reposts
- Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. π¬π§ Language/ΡΠ·ΡΠΊ/Sprache
- This is primarily an English-speaking community. π¬π§π¦πΊπΊπΈ
- Comments written in other languages are allowed.
- The substance of a post should be comprehensible for people who only speak English.
- Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures
We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations. - Keep discussions polite and free of disparagement.
- We are never in possession of all of the facts. Defamatory comments will not be tolerated.
- Discussions that get too heated will be locked and offending comments removed. Β
Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I live programs written in rust. They are quick & lightweight & fun.
Know what i hate ? Installing rust programs with cargo. It's slow & grinds my Chromebook to a halt.
I mean, that's not a Rust issue per se. It's only noticeable because
cargois much better than most build systems, and hence is an actual option for distribution of software. But there should ideally always be a binary distribution. I know some people like to build everything by themselves, but I get it, it's annoying.For people who do this, is the purpose to ensure you are not getting a bad binary which has some malicious code compiled in?
If yes, isnβt it more difficult to check all the source code yourself? You may as well trust a binary where the author has confirmed a hash of the binary. Unless you really are checking every single line of source code. But then I wonder how you get anything else done.
The idea is that someone is checking the code. And by building it yourself, you can at least ensure that you're getting what's built from the code. It is possible that some malicious stuff was inserted while building the binary that doesn't show up in the source code. Building from source solves that problem.
Reproducible builds try to solve that problem by generating some provenance from a third party. A middle ground can be building the binary using something like GitHub Actions, since that can be audited by others. That comes with its own can of worms since GH is owned by M$, but I digress.
So it is technically sane to do it, just not very practical in my view. But for lesser known apps, I do sometimes build from source.
The incident from
xzgives a good example of where self-compiling stuff would be a good idea.The code was mostly fine, but the maintainer managed to include malicious instructions in the binary. Most people who read the source, didn't realise the possibility. I checked it out afterwards and it was still hard to get.
Okay so, this is less a line in the sand and more a 14 foot concrete wall topped with razor wire and guarded by marines with rifles with fixed bayonets in the sand:
I will not install an end-user application using Cargo, and I will say many mean things to anyone who suggests it.
Python's Pip or Pypi or PyPy whichever it is (Both of those are the names of two different things and no one had their head slammed into a wall for doing that; proof that justice is a fictional concept) I can almost accept. You could almost get me drunk enough to accept distributing software via Python tooling, because Python is an interpreted language, whether you ship me your project as a .exe, a .deb, a flatpak, whatever, you're shipping me the source code. Also, Python is a pretty standard inclusion on Linux distros, so Pip is likely to be present.
Few if any distros ship with Rust's toolset installed, and the officially recommended way to install it, this is from rust-lang.org...is to pipe curl into sh. Don't ask end users to install a programming language to compile your software.
Go ahead and ask your fellow developers to compile your software; that's how contributing and forking and all that open source goodness should be done. But not end users. Not for "Install and use as intended." For that, distribute a compiled binary somehow; at the very least a dockerfile if a service or an appimage if an application. Don't make people who don't develop in Rust install the Rust compiler.
Yeah, the good tooling also means it isn't even terribly difficult for the dev to provide builds, but it isn't quite as automated as publishing to crates.io, so many don't bother with automating or manually uploading...
cargo install xyzandapt install xyzaren't mutually exclusive.Pypi isn't in any way less an option for distributing software countless projects that use it that way can be used as a proof. Hell, awscli installed from pypi for ages. In my experience cargo is extremely slow at downloading hundred libraries that every program needs and rustc is extremely slowly builds them.
Correction, uv isnβt in any way less an option. pypi is only the registry. If you are using pip you will end up in dependency hell, you might use something like poetry to avoid that, but uv is just better.
But... wait a minute... uv is inspired by cargo, and it's also written in rust. That's quite the coincidence, huh?
Also, cargo is fast, it's rustc that's slow, and that's because rustc is doing advanced code analysis. Compiling rust is actually NP-hard, but in exchange for that, the compiler will catch bugs in place of the developer. Which is a good tradeoff considering that you only compile once and run many times.
"countless projects that use it that way" isn't proof of anything. Countless projects tell you to
curla 2000 lines script intosudo bashthat will fill your os with bullshit.Pip is a sane default that works for absolute majority of cases, anyway correct tool for installing programs from pypi is pipx that eliminates 'dependency hell', but ofc new cool tool is the only way to do things.
When little program in rust that replaced previous one compiles two hours compared to previous that compiled in a few minutes it matters.
None of the issues you've described are Cargo's fault. The long compilation time is simply rustc's compile-time checks (ensuring type and memory safety is much more involved than lexing in GCC), and the number of dependencies to compile is a result of the crate ecosystem. Cargo is just the front-end that automates fetching dependencies and compilation with rustc. Blaming it for slow compilation is like hitting your monitor when the computer is acting up.
I'm not blaming cargo specifically for building it is slow to download deps as well, which was clearly stated in my first post. I'm going to edit it now.
UV is a lot more than pipx. It installs applications from pypi, without dependency hell, but it also uses hard links when possible to avoid wasting space. But it's also a dev tool. It manages python installations, workspaces, you can use it to edit the pyproject, it can also publish to pypi, even from a GitHub action if set up from pypi. It just does a lot more.
I know what uv is, also never felt the need for package manager do a lot more. Just not my use case, pip + pipx is enough for me. I do develop in python but I'm trying to do it as tidy as possible without any or minimal external deps due to environment constraints, maybe for web dev or other fields where there is a need to install billion external libraries and multiple versions of them uv is a right choice, who knows. Personally I would prefer first party tool.
The Rust compiler is more sophisticated than most compilers, so it can be slower at the same kind of tasks. But it also just does a different task here.
One of the tradeoffs in Rust's design is that libraries get compiled specifically for a concrete application. So, whereas in most programming languages, you just download pre-compiled libraries, in Rust, you actually download their source code and compile all of it on your machine.
This isn't relevant, if you get a pre-built binary. And it's not particularly relevant during development either, because you get incremental compilation. But yeah, if someone wants to compile a Rust codebase from scratch, then they have to sit through a long build.
Average C from source experience: (copied from Kicad)
Average Rust from source experience:
Most of the time you should probably not install from source of possible.
The C example is the wonderful happy path scenario that only manifests in dreams.
Most projects don't have a dependency list you can just install in a single apt command. Some of those dependencies might not be even available on your distro. Or there is only a non-compatible version available. Or you have to cast some incantation to make that dependency available.
Then you have to set some random environment variables. And do a bunch of things that the maintainers see as obvious since they do it every day, so it's barely documented.
And once you have it installed, you go to run it but discover that the fantastic CLI arguments you found online that would do what you installed this program to do, are not available in your version since it's too new and the entire CLI was reworked. And they removed the functionality you need since it was "bad practice and a messy way to do things".
All of this assuming the installation process is documented at all and it's not a "just compile it, duh, you should know how to do it".
I try not to build from source often. My computer is a potato.
Then why do you need cargo in the first place, sir? You install a program written i Rust just as if it isn't. When you
apt install xzy, you don't even know what language is used to program it.And if the developer only publishes the source?
That's your distro's problem, not the developer's
I don't think it is the distro's responsibility or the developer's responsibility. I think it is up to a volunteer whether they package it for the distro, or up to you as the consumer to install it on your own, or find a distro with more packages.
What if the developer of this C program only publishes the source code? Evil?
I think that's valid as well.
OK, apologies, I'll stop taking weird.
The developer is only supposed to share his code. It's the distro's responsibility to provide binary build of famous programs so that most users don't have to compile. When they don't, it's inevitable that individual users have to build it themselves. This has been the norm for decades.
It has been, but it does seem like that's starting to change
The distro does provide it, but I wouldn't say they are responsible for it, unless you are paying them. Otherwise that sounds like entitlement.
As a consumer sometimes you just have to install from source. Not everything is always in apt.
If you tell me to install an end-user facing application with a programming language's package manager, I'm out. Like, Adafruit was at one point recommending a Python IDE for their own implementation of micropython called Mu, and the instructions were to install it with Pip. Nope. Not doing that.
Me: I wanna try this node program, how do I install it?
Node: Well first you need to download these 100 node packages using your system package manager before you can use my package manager.
Me: And then I can install node packages at the user-level?
Node: Oh you poor sweet summer child. At the directory-level, of course!
Me: Oh okay. Is... is all this highly necc-
Node: It's better this way.
Annoyed Maintainer: fine, here's a Docker file. Stop filing bugs about how you can't install node.
Try
cargo-binstallI'll look it up. I'm guessing it install app images?
I'd guess just binary builds, no need to reinstall the entire environment again every time you install something.