{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihwwnenp2fotw2ptsmxhla74vsrluamffo3ogn2ewtctz6x733n5a",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mkkevie5t6s2"
  },
  "path": "/t/pre-rfc-dns-domains-as-package-namespaces/24202?page=2#post_30",
  "publishedAt": "2026-04-28T08:40:52.000Z",
  "site": "https://internals.rust-lang.org",
  "tags": [
    "crates.io"
  ],
  "textContent": "> Is there any reason not to be able to use an already published crate as a namespace(parent)? That way we don't need a separate naming system and in many cases this is also what you want (e.g. `tokio-util` could be at `tokio@util` ). In that case namespaces would be more like child-crates (possibly even allowing `parent@child@subchild` if desired.\n\nI think I covered this use case in an earlier post; what you're describing here is something like a reserved prefix. A user might have a project `mycoolproject`, and want to reserve the `mycoolproject-*` prefix for use by their crates. It's sort of like a v0.0.0 placeholder but it applies automatically.\n\nIn other words the purpose of a reserved prefix is to restrict the set of names other people can use. You'd get those names all to yourself.\n\nNamespaces are a bit different, the goal is to expand the set of names people can use. Namespaces allow lots of different people to publish crates even if some of those crates are different approaches to solving the same problem.\n\n> Random thought I had to post (I have no idea if this would actually be a good system):\n>\n> What if a crate author could simply choose a namespace, even if it is already used by someone else, then store a unique number (or a hash) in Cargo.lock that clearly identifies which one should be used (set on first use and cargo warning loudly if you are adding a crate from a namespace with the same human readable name, with an escape hatch if you really want to use the other one.\n\nI think this would go against some of the security goals that the Cargo and crates.io teams have written about.\n\nOne of the concerns about allowing namespaces is they might be used to impersonate popular crates, for example I could publish `john-millikin.com/tokio` and try to trick people into using it.\n\nIf anyone can publish a crate with any name and the only way to tell the difference is to examine the hash in `Cargo.lock` then it would be really hard to notice when someone is trying to pull a trick.",
  "title": "[Pre-RFC] DNS domains as package namespaces"
}