Packaging

A package is the unit Rux builds, ships, and depends on. Every package is a directory with a Rux.toml manifest at its root and its sources under Src/. That is true whether the package never leaves your machine or ends up on the public registry.

This section follows a package through its whole life: describing it, depending on other packages, finding it, and publishing it for other people to use.

Local packaging

Everything here works offline, with no account and no registry.

PageCovers
Package TypesExecutable, shared, static, and source libraries
Directory LayoutWhere sources, build output, and metadata live
Package ManifestEvery field of Rux.toml, and the rules each one follows
DependenciesDeclaring, resolving, and updating what your package needs

The registry

The public registry at rux-lang.dev/packages hosts published packages. Reading from it needs no account; publishing to it does.

PageCovers
The RegistryBrowsing, searching, and installing published packages
NamespacesPackage identity, claiming a namespace, and sharing ownership
API TokensCredentials that let the CLI act on your behalf
PublishingPreparing a package and uploading a release
VersioningSemantic Versioning, immutability, and version requirements
YankingWithdrawing a release without breaking existing builds

From a new package to a published one

The short version of the whole section:

rux new Widget --source --namespace Acme # Create a publishable package
rux add Io                              # Depend on something
rux check                               # Make sure it compiles
rux pack                                # Inspect the archive
rux publish --dry-run                   # Validate without uploading
rux publish                             # Release it

Each step has its own page here, and every command has a page in the CLI reference.

Publishing has two requirements a local package does not: a Namespace and a MinRux version. Both are described in the manifest reference.