Skip to main content

Module discover

Module discover 

Source
Expand description

Discovery: how the repository’s web surfaces are found without anybody listing them.

Four inference sources, none of them a register a person maintains:

  1. the executable’s own routes, from the constants that already declare them once — the capability prefix, the OpenAPI document, the Swagger UI, MCP and the Cockpit;
  2. the generated web root, target/web/<id>/, where a producer writes its output and a surface.json beside it declaring the intent no directory walk can infer;
  3. the site configuration, which says the Zola application exists and where it is built, so the application is discovered rather than assumed;
  4. the crate, whose presence says its rustdoc exists as a surface whether or not anybody has run cargo doc in this checkout, so the crate’s reference is discovered from the source it documents rather than from the output of one machine.

Everything a consumer can be surprised by carries its Provenance, so web explain answers “why is this here?” from data rather than from this module’s source.

Structs§

Declaration
A producer’s declaration: the intent that no walk of its output can infer.
Reserved
A mount whose meaning is fixed: the role it serves, the path it is at, and the id of the surface that must hold it.
Runtime
What the running executable offers, which changes what it can answer for.

Constants§

APPLICATION
The identity of the site as it is published, which owns / of a deployment.
DECLARATION_FILE
The file a producer writes beside its output to declare what it is.
DECLARATION_SCHEMA
The contract of a producer’s declaration.
DOCS
The identity of the served documentation build, mounted under DOCS_MOUNT.
DOCS_ARTIFACT
Where the documentation build for DOCS_MOUNT is written, repository-relative.
DOCS_MOUNT
Where the documentation is served by a running process, and the base URL its build is made for. / belongs to the process’s own home page, so the site is mounted below it.
GENERATED_ROOT
The generated root every static producer writes into, repository-relative.
HOME
The identity of the surface that answers /: the page this process is entered through.
RUSTDOC
The identity of the crate’s rustdoc, mounted under RUSTDOC_MOUNT: named after its producer, as swagger is, because “reference” already means several other things here.
RUSTDOC_ARTIFACT
Where the rustdoc for RUSTDOC_MOUNT is written, repository-relative: one directory of the generated root, owned by its producer alone.
RUSTDOC_MOUNT
Where the crate’s rustdoc is served and published.
RUSTDOC_PRODUCER
The command that writes RUSTDOC_ARTIFACT: the same cargo doc invocation the gate proves warning-free, so the published reference is the one that was checked.
SITE_CONFIG
The site’s own configuration, repository-relative: what says this repository has a site at all.
SITE_PUBLIC
Where the site generator writes the build made for deployment, repository-relative.

Functions§

application
The site, when this repository has one: the deployment and the local build of it.
discover
The whole topology of a repository: the executable’s routes, the application, the crate’s rustdoc and the generated reports.
generated
Every generated static surface: one directory under the generated root, each declaring itself.
native
The routes the executable answers itself, narrowed to what this process offers.
native_all
The routes the executable answers itself, from the constants that declare them.
reserved
The mounts this repository reserves.
rustdoc
The crate’s rustdoc, when this repository has the crate.