Namespaces

A published package is identified by two parts: a namespace and a name. The namespace is the account or organisation that owns the package, so Rux/Io and Acme/Io are different packages that happen to share a name.

[Package]
Namespace = "Acme"
Name = "Widget"

Together they form the identity used everywhere — Acme/Widget on the command line, in a dependency entry, and in the registry URL.

Namespace is optional locally. A package without one is local-only: it builds, runs, and can be depended on by path, but it cannot be published. rux new and rux init take an optional --namespace <Namespace> when you already know where a package will live.

Identity segments

Namespaces, package names, keywords, and dependency import names all use the same grammar. A segment is 1 to 64 bytes of ASCII alphanumeric characters separated by single - or _ characters. It cannot start or end with a separator, and it cannot contain two separators in a row.

ValidInvalidWhy
Rux-PkgLeading separator
My_PkgPkg-Trailing separator
my-pkgMy__PkgAdjacent separators
7zipMy.Pkg. is not a separator

Normalization

Lookup and uniqueness lowercase ASCII letters and fold _ to -. Rux/My_Pkg and rux/my-pkg therefore identify the same package, and only one of them can be claimed.

Tools preserve the spelling you wrote for display, so a package published as Acme/FastJson keeps its capitals on its page and in Rux.toml while resolving as acme/fastjson. Registry URLs use the normalized form.

Keywords follow the same rule and must stay unique after normalization, so ["Http", "HTTP"] is rejected as a duplicate.

Claiming a namespace

Sign in to the registry with GitHub and claim one from your dashboard. Claiming makes you its first owner. Because normalized spellings collide, Foo_Bar and foo-bar cannot be claimed separately.

A namespace you own is the only place you can publish. Attempting to publish into a namespace that does not exist, or one you are not a member of, is rejected — see Publishing.

Sharing a namespace

A namespace has two roles:

RoleCan
ownerPublish, yank, invite and remove members, change roles, and manage the namespace
maintainerPublish and yank

Owners invite an existing registry user by GitHub login from the namespace page in the dashboard. Invitations expire after seven days, and only one unresolved invitation can exist for a user and namespace at a time. The invitee accepts or declines from their own dashboard; an owner can revoke an invitation before it is accepted.

A namespace always keeps at least one owner. Removing the last one is refused, and so is deleting an account that is the final owner of any namespace — promote or add another owner first.