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
//! Server-state-backed reactive components - Larust's Livewire equivalent.
//! Unlike Livewire's client-held, HMAC-signed state snapshot (a workaround
//! for PHP/Laravel's stateless-between-requests model), a component's state
//! lives entirely server-side, keyed by the user's session: only an opaque
//! component id ever crosses the wire. See `docs/ARCHITECTURE.md`'s
//! "Reactive components" section for the full design rationale.
//!
//! The crate itself keeps its original name (`larust-live`) - only the
//! user-facing directive/trait/route surface is `@wire`/`WireComponent`/
//! `/__larust_wire/...`.
//!
//! App authors implement [`WireComponent`], register instances via
//! [`components`]/[`LiveRegistry`], mount them from a template with
//! `@wire('name', { prop: expr, ... })`, and wire the two routes this crate
//! provides ([`update`], [`runtime_js`]) into their app's router - nothing
//! here is auto-mounted, matching this framework's "explicit over magic"
//! convention for routes/middleware/listeners elsewhere.
//!
//! [`push`] is a separate, unrelated feature living in the same crate:
//! genuine server-*pushed* updates (`@live('channel') ... @endlive`,
//! WebSocket-based) rather than `@wire`'s client-*initiated* AJAX sync -
//! see that module's own doc comment for why these two are deliberately
//! not the same mechanism.
pub use WireComponent;
pub use mount;
pub use ;
pub use ;
/// The two routes `@wire(...)` needs, bundled for [`larust_http::Router::plugin`] -
/// sugar for the exact `.get`/`.post` pair this module's own doc comment
/// shows an app writing by hand today. Registration itself is still the
/// app's explicit choice (`.plugin(WirePlugin)` in `routes/web.rs`), this
/// only removes the need to know or copy the two literal route strings.
;