component-shape
component-shape provides framework-neutral metadata, value compatibility,
validated Rust syntax, and naming contracts for library and generator authors in
the component-shape project. Depend on it directly for shared contracts
that do not need a UI or protocol runtime. GPUI consumers can use the same
metadata through component-shape-gpui; typed schemas and decoding belong
in component-shape-mcp.
Requires Rust 1.99 or newer.
Example
A shape advertises the value it supports and a coarse input description without constructing a widget or starting an MCP server:
use ;
;
ComponentShapeFor<Value> can override this input description for a particular
shape/value pair. See the API reference for the metadata and syntax contracts.