News for hackers. Stuff that matters.
Re:Rust Without Crates.io by paulddraper on Tuesday November 14, 2023 @12:55PM (#38266860)
You create apt, rpm repos.

And users install from there.

Not saying that's a nice answer, but that is the answer.

Re:Rust Without Crates.io by takluyver on Tuesday November 14, 2023 @01:20PM (#38267242)
Users install from there, so long as they're using Linux, a Debian or Red Hat based distro, and have sudo access. As you say, not such a nice answer.

For certain kinds of software, this approach is getting more viable, thanks to containers. In some contexts, you can tell everyone to run your software in a container with a specific Linux distro inside. But that software is often distributed as container images directly, rather than distro packages to be used in containers.

Re:Rust Without Crates.io by josephg on Tuesday November 14, 2023 @03:11PM (#38268970)
You create apt, rpm repos. And arch. And gentoo. And FreeBSD ports. And homebrew and macports. And whatever windows does. And you need that to be true, on all those systems, for all your dependencies too. And at a recent, usable version.

Or, I just use cargo. Up to date version. One command install that works on every operating system. Project scoped dependencies - so there’s no need for sudo, and different projects can depend on different versions of their dependencies. And I can publish new versions of my packages with 1 command and they’re available everywhere.

Just in my house I have a Linux mint workstation, a windows gaming pc, a FreeBSD server and a Mac laptop. Cargo lets me publish code that all of them can consume with 1 command. So does npm.

So long as apt is worse than cargo I won’t use it for this stuff. Why does everything have to get installed system wide? Nix doesn’t need that. Why doesn’t it have a programmatic mirror of cargo so we don’t need to mirror rust projects in it by hand? Why do major versions have different package names? And why don’t packages support feature flags? Last time I looked there were about 30 vim packages with random combinations of feature flags set. Why can’t evergreen packages like nodejs or cargo stay up to date in Debian? Old nodejs is useless because it can’t run modern JavaScript.

I really want apt to solve all these problems because I hate docker. If apt and friends did their job well, docker wouldn’t be necessary or popular.

Cargo isn’t pretty either. But it has all the features I need to get my job done. Make apt a compelling tool and I’ll switch to it. The feature list developers want is hardly a mystery.

Re:Rust Without Crates.io by paulddraper on Tuesday November 14, 2023 @05:19PM (#38270622)
Correct, there are many operating systems.

That is why each modern language has introduced their own package manager.

Re:Rust Without Crates.io by josephg on Tuesday November 14, 2023 @05:55PM (#38271015)
I assume you’re being flippant, but it’s kind of true. You support 20 different things by making a 21st thing that papers over all of them. And along the way you can try to fix some of the design problems.

The web. The C programming language. Electron. It’s a tale as old as time.