1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! # plushie-core
//!
//! The public SDK for plushie. Extension authors depend on this crate to
//! implement the [`WidgetExtension`](extensions::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 `plushie` binary.
//!
//! ## Module guide
//!
//! **Extension SDK (stable API):**
//! - [`prelude`] -- common re-exports for extension authors
//! - [`extensions`] -- `WidgetExtension` trait, `ExtensionDispatcher`, `ExtensionCaches`
//! - [`app`] -- `PlushieAppBuilder` for registering extensions
//! - [`prop_helpers`] -- public prop extraction helpers for extension authors
//! - [`testing`] -- test factory helpers for extension authors
//!
//! **Internal modules** (used by the plushie binary, not part of the SDK):
//! `engine`, `tree`, `message`, `widgets`, `protocol`, `codec`,
//! `theming`, `image_registry`
// Ensure catch_unwind works: extension panic isolation requires unwinding.
// If this fails, remove `panic = "abort"` from your Cargo profile.
// On WASM, catch_unwind is a no-op (panics always abort), so skip this check.
compile_error!;
// -- Public SDK modules (stable API for extension authors) --
// -- Internal modules used by the plushie binary --
//
// These are public so the binary crate can access them, but they are
// NOT part of the stable extension SDK. Extension authors should use
// the prelude and `plushie_core::iced::*` instead.
// Re-export iced so extension crates can use `plushie_core::iced::*` without
// adding a direct iced dependency. This avoids version conflicts when
// plushie-core bumps its iced version -- extensions that use only
// `plushie_core::prelude::*` and `plushie_core::iced::*` get the upgrade
// automatically.
pub use iced;