Expand description
Nested structure derivation macros for Rust, plus the runtime half of the state-tree synchronization protocol.
§Macros
This crate is the public facade of the yuuka macro family: the
procedural macros themselves live in yuuka_macros and are re-exported
here so that the historical yuuka::derive_struct!, yuuka::derive_enum!
and yuuka::auto! paths keep working unchanged.
derive_struct!generates nested structs from a concise DSL-like syntax.derive_enum!generates enums (and associated structs) from the same syntax.auto!constructs values of the generated types with value-only syntax.
§State patch runtime
Alongside the macros, yuuka ships the runtime modules of the state-tree
synchronization protocol (migrated from plana packages/sync):
patch:PatchOp— a singleset/replace/deloperation on a dotted path, with a serde wire format that stays byte-compatible with theSync.StatePatchnotification.merge:merge_patch— the RFC 7396 JSON Merge Patch core behindsetoperations.diff:diff— turn a before/after state pair into the op list that reconstructsafterfrombefore.viewport:path_in_viewport/snapshot— crop the state tree down to the path prefixes a client subscribed to (theSync.StateSnapshotpayload).path: dotted-path helpers (split/join/segments/display) shared by the modules above.
Modules§
- crdt
- CRDT primitives for multi-writer state synchronization.
- diff
- Before/after diffing into
PatchOplists. - merge
- RFC 7396 (JSON Merge Patch) core.
- patch
- Patch operations for the state-tree synchronization protocol.
- path
- Minimal dotted-path utilities for the patch/diff modules.
- viewport
- Viewport snapshot computation — path-prefix subscription + subtree cropping.
Macros§
- auto
- Construct an instance of a type generated by
derive_structorderive_enumusing a minimal value-only syntax. - derive_
enum - Generate enums (and associated structs) from a concise DSL-like syntax.
- derive_
struct - Generate nested structs from a concise DSL-like syntax.