Publishing is designed to be a non-event. If your package builds, tests pass and the version is
valid, prism publish does the rest — including building the docs and running the linter for
you.
Before you publish
A package needs:
- A
prism.tomlmanifest withname,versionandlicense. - A
src/lib.prismentry point (or asrc/bin/for binaries). - At least one test. The registry refuses packages with zero tests — a small nudge that matters more than it seems.
The command
prism publish
The flow, in order:
- Runs
prism test. - Checks the version against the previous release.
- Builds the package for all supported targets.
- Uploads the tarball, checksums and generated docs.
- Prints the public URL.
Namespacing
Package names may be namespaced by user:
name = "ada/http"
Unnamespaced names are first-come, first-served. Namespaced ones are yours to manage and can be transferred.
Private packages
For proprietary code, publish a private package:
[package]
private = true
Private packages require an access token and are only fetchable by your projects. They behave identically otherwise — same lockfile, same checksums, same reproducible builds.
Yanking and fixing
Note:
prism yankis planned for a future release and is not yet in the v0.1.0 CLI.
Today, fixing a bad release means publishing a patch. The registry keeps every version, so existing lockfiles keep resolving, and new resolutions pick up the fixed release. Patches are the preferred fix: fix loudly, re-release quickly.
Tip: publish early and often. The registry keeps every version forever — your history is your package’s documentation.