Skip to content

Support optional namespacing for registries that support it #8266

@richardanaya

Description

@richardanaya

Support registries that will allow optional namespacing

[dependencies]
foo = { package = "richard/foo", version = "0.2", registry="richard_registry" }

Describe the solution you'd like

Allow a package creator to build a Rust app with a registry that supports namespacing ( a single forward slash )

All naming rules still apply, just the addition of a single forward slash.

Examples:

richard/foo
richard_co/foo
richard-co/foo

Namespace names have the same requirements as package names.

Why forward slash?

Two names separated by a forward slash is a very common convention in most package management systems.

Notes

  • This issue has nothing to do with changing crates.io, it is simply about making it an option for alternative registries that do.
  • This feature won't prevent people from using registries that don't support optional namespacing if those registries match their name desires better.
  • in the bizarre edge case I have two namespaced packages with same name, i'd just alias them appropriately
foo = { package="richard/foo", registry="richard_registry" }
sam_foo = { package="sam/foo", registry="sam_registry" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-interacts-with-crates.ioArea: interaction with registriesA-manifestArea: Cargo.toml issuesA-registriesArea: registriesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-rfcStatus: Needs an RFC to make progress.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions