Skip to main content

Crate toddy_core

Crate toddy_core 

Source
Expand description

§toddy-core

The public SDK for toddy. Extension authors depend on this crate to implement the WidgetExtension trait and build custom native widgets. The prelude module re-exports everything an extension needs; iced is re-exported so extensions don’t need a direct iced dependency.

This crate also provides the rendering engine, wire protocol, and widget infrastructure used internally by the toddy binary.

§Module guide

Core engine:

  • engineCore struct: pure state management decoupled from iced runtime
  • tree – tree data structure, patch application, window discovery
  • messageMessage enum, keyboard/mouse serialization helpers

Widgets:

  • widgets – tree node to iced widget rendering (all widget types)
  • [widgets::overlay] – custom Widget + Overlay impl for positioned overlays

Protocol:

  • protocol – wire message parsing and event serialization
  • codec – wire codec: JSON + MessagePack encode/decode/framing

Platform:

  • theming – theme resolution, custom palette parsing, hex colors
  • effects – platform effect handlers (file dialogs, clipboard, notifications)
  • image_registry – in-memory image handle storage

Extension SDK:

  • extensionsWidgetExtension trait, ExtensionDispatcher, ExtensionCaches
  • appToddyAppBuilder for registering extensions
  • prelude – common re-exports for extension authors
  • prop_helpers – public prop extraction helpers for extension authors
  • testing – test factory helpers for extension authors

Re-exports§

pub use iced;

Modules§

app
Application builder for registering widget extensions.
codec
Wire codec for the stdin/stdout protocol.
effects
Platform effect handlers (file dialogs, clipboard, notifications).
engine
Pure state engine, decoupled from the iced runtime.
extensions
Widget extension system.
image_registry
In-memory image handle storage.
message
Internal message enum and serialization helpers.
prelude
Common re-exports for widget extension authors.
prop_helpers
Public prop extraction helpers for widget extensions.
protocol
Wire protocol types for host-renderer communication.
testing
Test factory helpers for widget extension authors.
theming
Theme resolution and hex color parsing.
tree
Retained UI tree.
widgets
Widget rendering: tree node to iced element mapping.