Skip to main content

Module sign_host

Module sign_host 

Source
Expand description

The signs guest→host sign-declaration seam (SG.3a).

A sign-contributing plugin implements the sign-plugin world: it imports the signs API (define-sign) and exports register-signs, which the host calls once to drive declaration. This module holds the bindgen! for that world plus the host-side conversion from the WIT sign-spec to a native SignDefinition, factored out so it is unit-testable without a Store (the theme_host precedent).

The canonical API is the WIT (signs.wit) — any component-model language calls define-sign directly. A plugin’s sign lands in the SAME registry native producers use, so it is styled through the ordinary theme registry, contends for the mark cell by the same priority rule, and needs NO host kind-branch.

See docs/dev/architecture/gutter-signs.md.

Functions§

define_plugin_sign
The define-sign host-service body. Registers into the SAME registry native producers use, namespaced by plugin id so unload can reverse it.
sign_definition_from_wit
Convert a WIT sign-spec plus its namespaced name to the native definition.