3 ms·
Package namespacing in Rust is not foundational -- the compiler and toolchain are decoupled from the identifier used by crates.io and Cargo. Non-Cargo build sys
by jmillikin 3y ago
Package namespacing in Rust is not foundational -- the compiler and toolchain are decoupled from the identifier used by crates.io and Cargo. Non-Cargo build systems (such as Bazel) are able to work with arbitrary package names without problem.
There are three general directions crates.io package namespaces might take, and aesthetics plays a major role in not currently having any of them:
1. Use human-readable strings as on Github, yielding package names like `jdoe/some-package`. The crates.io maintainers prefer to avoid this due to potential operational load from people requesting changes to their username.
2. Use opaque (but stable) namespaces such as an integer user id, yielding package names like `user-12345/some-package`. Some people have a strong aesthetic aversion to this.
3. Assign each package a UUID. This is technically possible in current crates.io if the leading character is [a-f], but I've never felt mean-spirited enough to actually do it.