Skip to main content

Module exports

Module exports 

Source
Expand description

The shareable-unit set (packaging slice 1, #2207; track D1): a package’s [package] exports lists the units it shares, and each must be a commons or an adapter the project declares. A context is never shareable — it is a deployment unit, whose Worker, secrets and deploy state belong to the project that deploys it.

bynk.toml’s shape is bynk-project’s to check; whether each entry names a shareable unit needs the project’s units, so it is checked here, once they are known, and attributed to the manifest like the [unstable] diagnostics (crate::stability::MANIFEST). The build and the editor read [package] the same way ([bynk_project::read_package_config]).

Constants§

EXPORT_CONTEXT
The error for an exports entry naming a context.
EXPORT_UNKNOWN
The error for an exports entry naming no unit the project declares.

Functions§

check_exports
The diagnostics for exports against kinds. A first-party unit is never the project’s own, so it counts as undeclared.
manifest_diagnostics
The [package] exports diagnostics for the project at project_root, against its units’ kinds (as phase_group builds them). No project root, no [package], or no exports list is nothing to check.