Expand description
The async gutter-decoration producer seam (PL8.E).
Mode::gutter_decorations (see crate::contributions) is the sync,
read-per-frame decoration trait native modes (diff, LSP severity) satisfy
inline. A WASM plugin can NOT satisfy it that way — running the guest per
frame from the renderer would violate paramount goal #1 (no UI-thread WASM).
Instead a plugin decoration provider is an AsyncGutterDecorationSource:
the host polls it OFF the render path on a trigger (edit / scroll /
producer (de)registration), caches the returned Vec<GutterDecoration> per
buffer, and the renderer reads only that native cache — never the producer.
The trait + registry live here (not in lattice-plugin-host) so the
substrate-neutral lattice-mode and the renderers (which read only the
cached GutterDecorations) stay free of any wasmtime dependency. The single
implementor today is the plugin host’s WasmDecorationSource; the
indirection mirrors AsyncCompletionSource (lattice-completion) and
PickerSourceGenerator (lattice-picker) — a generic native trait a WASM
source implements, so the loader hands a trait object across the seam.
Structs§
- Decoration
Epoch - The counter a guest bumps to say “my decorations changed, though the document did not” (OA.30).
- Gutter
Decoration Source Registry - Runtime-mutable registry of
AsyncGutterDecorationSources.
Traits§
- Async
Gutter Decoration Source - An async, off-render-path producer of a buffer’s gutter decorations.
Type Aliases§
- Decoration
Epoch Handle - Register and look up with this exact alias (the
ServiceRegistryTypeId rule). - Decoration
Future - The boxed future an
AsyncGutterDecorationSource::producereturns. - Gutter
Decoration Source Registry Handle - Boot-service handle:
Arc<ArcSwap<…>>so the loader RCU-registers producers at runtime while the host reads wait-free. Register and look up with this exact alias (theServiceRegistryTypeId rule).