Component Build
link-component-build is what a package's build script calls to embed
its component description, read from Cargo and its declarations, and
the pages it owns. Discovery never runs an installer or resolves Cargo:
everything a program says of itself is already in its binary
(Components).
embed()
Called by a plugin's build script. It resolves the package's
plugin.toml and Cargo manifest into Resolved and writes it as
component.json in OUT_DIR, and writes external-pins.rs: a
constant of each pin plugin.toml names, read from the file it points
at in the package.
What it refuses
A plugin's Cargo name must start with link-plugin-, and it owns
exactly one program, lnk-<id>. An option schema, a pin or a page
outside the package is refused, as is a pin alias that isn't letters,
digits and dashes, as is a page that's a symbolic link ("documentation must
stay in its owner") or a documentation topic named twice.
Its pages
The pages are the package's docs/en/ Markdown, but navigation.md, and
those of the folders under it that aren't another plugin's.
core()
The core's registry, generated from the resolved source declarations:
each workspace member with a plugin.toml, resolved and validated as
one registry (registry.json), refusing a plugin identity named twice
and a member pattern not expanded. Its pages, with core/plugin's, go
in documentation.json.
Product components
LNK_COMPONENTS is an explicit build input: local component directories
separated as PATH is, relative to the public workspace or absolute.
Each is resolved from its owning Cargo workspace, must have this core's
version, and cannot replace a registry identity. With no input, only the
core's workspace is read. Build and release packaging use the same
input; services cannot add declarations or change the release signer.
manual()
Shared guides and documentation-only subjects belong to the optional
manual: each root scripts/documentation-index.json names, but web/,
core/ and those inside a plugin, gives its pages to manual.json.