Expand description
Additive Tier-1 hot-patch differ for view! { ... } Rust source files powered by
nativeview_view_syntax.
Compares old vs new .rs source files containing view! blocks:
- Single-sources lexing,
view!scanning/parsing, deterministicXXH64[AnchorKey] computation, string interpolation analysis, and the Tier-1 direct-root allowlist (Node,LeafNode,Text,Pressable,ScrollView,Column,Row, bare string literals) directly fromnativeview-view-syntax. - Reuses
hot_diff’s typed attribute specs, const evaluator,TypedStyle/Stylechain scanner, and direct binaryRowPatchword lowering (zero CSS string emission). - Emits
HotPatchMsg::TemplatePatchwithtemplate_key = anchor_key.0andnode_path = Vec::new(), matchingnativeview_hot_reload::HotPatchIndex’s O(1) contract. - Falls back cleanly to
ViewDiffOutcome::NeedsRebuildfor non-view!Rust code edits, structural tree edits, control-flow changes, dynamic expressions, interpolated strings, or composite component (Button,Card,Dialog, path-qualified tags) edits.
Re-exports§
pub use patch::TypedViewPatch;pub use patch::ViewAnchorTarget;pub use patch::ViewAttrChange;pub use patch::ViewTextChange;
Modules§
- patch
- Typed Tier-1 patch model (
TypedViewPatch) andAnchorKey-addressed binaryHotPatchMsg::TemplatePatchlowering forview!files.
Enums§
- View
Diff Outcome - Classification of a watched
.rsfile save containingview! { ... }blocks.
Functions§
- classify_
for_ watch - Watch-loop classifier behind
crate::hot_diff::WatchCache::classify_batch. - diff_
view_ source - Diffs
old_srcagainstnew_srcfor a.rsfile atrel_filecontainingview! { ... }blocks and classifies the edit asViewDiffOutcome::NoOp,ViewDiffOutcome::Tier1Patch, orViewDiffOutcome::NeedsRebuild. - has_
view_ macro - Fast, zero-allocation pre-check followed by token confirmation returning
trueiffsrccontains at least oneview! { ... }/view!(...)/view![...]macro invocation outside comments, string literals,macro_rules!definitions, and.view!method positions.