External Publication
Visit Post

[Pre-RFC] DNS domains as package namespaces

Rust Internals [Unofficial] April 28, 2026
Source

What is a namespace if not a reserved prefix.

A prefix is part of the crate name, so it's passed along to rustc. The serde-derive package has the crate name serde_derive.

A namespace is part of the package name but is not part of the crate name, it gets stripped off and is not visible to rustc. The example.com/xml package would have the crate name xml.

And on your fuse/sane/sleigh example: Still possible. The main downside is that your (arbitrarily chosen) namespace must not conflict crate names

The main downside of using a prefix when it's not justified by membership in a larger project is that the name would become unclear. A package named example.com/xml is clearly an XML library, but a package named somecoolproject-xml is something related to somecoolproject.

Discussion in the ATmosphere

Loading comments...