Modules & Registry
Imports and namespacing
- Use
foo::barstyle namespaces; the linker in VCL resolves module paths. - Modules live under
vcl_modules/by default when installed from the registry.
text
import auth::session.
define handler.
let user = auth::session::current ctx.
ensure user.
return user.
Publishing & installing
- Local registry path defaults to
$HOME/.vcl-registry(see README). vcl publishcopies the current module (fromvcl.json) into the registry.vcl install <name>pulls intovcl_modules/<name>/and updatesvcl.json.
Versioning
- Semantic versioning is recommended; the current registry is local-only. Remote registry is planned.
Advice
- Keep module APIs small: prefer record params over many scalars.
- Re-export from
index.vclto give consumers stable entry points.
See also: Stdlib for shipped modules and CLI for publish/install commands.