Guide
Packages & the registry
A package is a directory of modules described by one manifest — vendored flat, resolved local → vendor/ → stdlib, and published through a gate.
format: package
version: 2
name: poster-tools
pkg-version: 0.1.0
summary: A poster look built on imaging-extras
deps:
imaging-extras 0.1.0
modules:
posterizeptc vendor copies a package's modules into vendor/ next to your entry file; given a registry URL it resolves deps: transitively (cycles and conflicts are teaching errors) and records everything in vendor/vendor.lock:
ptc vendor ../imaging-extrasVendoring the same package again refreshes it (Sprints 432–434): from a directory it takes the package as it is now; from a registry it takes a newer listed version. The lock records which package owns each module, so a refresh overwrites only its own modules, removes the ones it no longer lists, never lowers the version, and a refusal changes nothing.
Before a package meets the registry, ptc pack runs the publishing gate (Sprint 50): strict manifest, fmt --check over every module, a /// doc on every pub item, and every test green — at least one test required, so an untested package cannot pass:
ptc pack examples/packages/poster-tools