To me, the two major problems are:

  1. no namespaces

Someone uploads “serde2”? that’s blocked forever. Someone uploads a typo version of a popular package? Too bad for you, learn how to type.

  1. the github connection

If you want to contribute to crates.io you’re bound to github. No gitlab, codeberg, gitee, sourcehut, etc.

Not sure if there are any other problems, but those two seem like the biggest things and #1 is AFAIK not something they ever want to change + it would be difficult to as one would need a migration strategy.

0 points
*

there’s https://lib.rs/, never actually used it myself, but it calls itself an alternative to crates.io

permalink
report
reply
8 points

That’s just for the web-based UI, not the database behind it.

permalink
report
parent
reply
1 point

ah ok, so i’m assuming it doesn’t fix either of the issues listed then. thanks.

permalink
report
parent
reply
2 points

Not sure how that’s an alternative as there’s no way to add anything to it. It seems more like an aggregator that a registry.

permalink
report
parent
reply
12 points

Apparently there’s an effort underway. I don’t have any more context than this:

https://news.ycombinator.com/item?id=38020117

I will say that I actually like the flat namespace, but don’t have a strong opinion

permalink
report
reply
1 point

Interesting. Nice to know there are more people who agree and with the time to do something. Hopefully something will come of it.

permalink
report
parent
reply
4 points

Why should I believe this?

I followed the link in echelon’s HN profile to their GitHub profile. It’s the same name, like you’d expect, but I had to check.

If they were a member of the Rust project, they’d have an entry in the rust-lang/team repository, and they don’t. The fact that they’ve written some code in the Rust language doesn’t automatically make them trustworthy, or give them information about what happens in closed council meetings.

permalink
report
parent
reply
1 point

You should believe it as much as you want. I don’t have any inside knowledge myself, I just remembered an HN comment that was relevant to this post and linked it.

permalink
report
parent
reply
4 points

I hope they don’t end up fragmenting the community or the ecosystem.

permalink
report
parent
reply
2 points

I don’t understand the “serde2” issue. Isn’t “someusername/serde” strictly worse than “serde2”?

GitHub being the only auth provider is something the maintainers wanted to fix, but didn’t have enough bandwidth to implement. I think they would welcome contributions!

permalink
report
reply
28 points

If Github isn’t used for source control, why on earth is it the only auth provider?

Why has crates.io given Microsoft the ability to control who can and cannot publish Rust code?

Namespacing is whatever, but IMO the real issue is the disproportionate and unnecessary amount of power given to a company known for pushing monopolies.

permalink
report
reply
18 points
  • GitHub wasn’t always owned by Microsoft. At least get your dates right.
  • Yes, GH shouldn’t be the sole auth provider.
permalink
report
parent
reply
8 points

Isn’t github used only as the auth provider? It is not using any git features, just leaning on the security guarantees of github. I don’t find this too alarming.

If you want, you can use git links when declaring dependencies in Cargo.toml. So alternative to crates.io is basically any git host already!

permalink
report
reply
3 points

Semver checks don’t work with straight git urls, since you can only link to an explicit branch or commit, not a version.

permalink
report
parent
reply
3 points

version can be passed with git actually. And it will need to match with the version set in Cargo.toml from the git source.

I wouldn’t call that an alternative to crate registries though (of which, crates.io is only one impl).

Also tangentially related, cargo-vendor is a thing.

permalink
report
parent
reply
3 points

Semver strings allows stuff like “version 2.5.x, but below 2.5.6”. Then cargo calculates the best solution for satisfying all dependency specifications from all packages using a single version (if possible).

Specifying a version in addition to the git branch doesn’t help there at all, because you still have to do it manually then.

permalink
report
parent
reply
6 points

Isn’t github used only as the auth provider?

Still makes you bound to github. Can’t publish to crates.io without github.

just leaning on the security guarantees of github

What security guarantee does github have? I can create a new account right now with a random email, sign up for crates.io and type-squat a package.

If you want, you can use git links when declaring dependencies in Cargo.toml. So alternative to crates.io is basically any git host already!

Sure, but how do you discover the package? That’s the other function of a registry. Also, I could easily just add another package as a submodule, but that’s not the point.

permalink
report
parent
reply
3 points

I think the security guarantee is for the user and their credentials, not the community and trustworthiness of individuals.

permalink
report
parent
reply

Rust

!rust@programming.dev

Create post

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

Community stats

  • 392

    Monthly active users

  • 836

    Posts

  • 3.8K

    Comments