pub struct ChipSpec {
pub glyph: String,
pub fallback: String,
pub color: String,
pub enabled: bool,
pub in_palette_bar: bool,
pub badge_key: Option<String>,
pub glyph_svg: Option<PathBuf>,
pub glyph_svg_bytes: Option<Vec<u8>>,
pub glyph_codepoint: Option<String>,
}Expand description
Visual + interaction settings for the sibling’s chip. Display
strings (label, description) live at IntegrationSpec top
level, not here — the chip is about rendering, not identity.
Fields§
§glyph: String§fallback: String§color: String§enabled: bool§in_palette_bar: bool§badge_key: Option<String>§glyph_svg: Option<PathBuf>Deprecated in 0.5 — kept for backwards compat with
0.4 integrations. Path (relative to the sibling repo root,
or absolute) to an SVG file the integration owns. On
install_integration the file is copied to
~/.config/mnml/glyphs/<id>.svg where it lives permanently.
User feedback: that persistent copy under ~/.config/ is
noise. Use [glyph_svg_bytes] instead — bytes get written
to ~/.cache/mnml/pending-glyphs/, mnml bakes them into
MnmlSymbols.ttf at next startup, then deletes the pending
file so nothing lingers under the user’s config dir.
glyph_svg_bytes: Option<Vec<u8>>SVG bytes for the integration’s icon — typically produced
by include_bytes!("assets/icons/<id>.svg").to_vec() at the
integration binary’s build time.
On install_integration, the bytes are written to
~/.cache/mnml/pending-glyphs/<id>.svg. mnml bakes any
pending SVGs into ~/Library/Fonts/MnmlSymbols.ttf at the
next startup and DELETES the pending file so there’s no
permanent glyph state under ~/.config/mnml/. glyph_codepoint
(if set) pins the codepoint the sibling wants; otherwise
mnml auto-assigns from the U+F1C00–U+F1CFF range.
This is the preferred field over [glyph_svg] since 0.5.
Never serialized to the manifest TOML — bytes are consumed
at install time and discarded.
glyph_codepoint: Option<String>Optional explicit codepoint the sibling wants (uppercase
hex, no U+ prefix — e.g. "F1C05"). When set, mnml uses
this codepoint verbatim for the sibling’s SVG bake instead
of auto-assigning one from the sibling PUA range
(U+F1C00–U+F1CFF). Useful for migration cases where a
sibling wants to keep the codepoint mnml core baked before
this SDK feature landed. Trusted — no range validation
beyond “parses as u32”; the manifest author is expected to
stay inside mnml’s PUA layout documented in
src/icon_catalog.rs.