Repository navigation
Improve Avalonia-to-Rust mapping with hierarchy traits, rsx!, reactive signals, AXAML transpiler, and view-model scanner - #13
Merged
Marc-André Moreau (mamoreau-devolutions) merged 3 commits intoOct 21, 2026
Conversation
…s, and view-model scanner - Add #[repr(transparent)] control wrappers, Deref inheritance, and Upcast<Ancestor> - Add ergonomic tuple/scalar/hex From conversions, content_text/header_text helpers, and inline attached-property builders - Add deferred El<T> view builders, rsx! macro, and reactive DataTemplate container pooling - Add AppScope fine-grained Signal<T>, Memo<T>, Effect, NodeRef<T>, and IntoProp<T, Marker> with two-way bindings - Add reactive_view_model! / prop! macros and ViewModelRustScanner (--scan-rust) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… scoped reactivity - Add Downcast<Target> (is/cast), object_id, same_object, and NonOwningRef<T> - Add Show::when/when_else, keyed For::each / KeyedListReconciler, ControlSlot, and mount_into_* - Add AppScope::theme_variant_signal, resource_signal, and theme_brush - Extend reactive_view_model! with derived properties, can_execute predicates, and when_any! - Add compile-time AXAML-to-Rust transpiler (compile_axaml / --compile-axaml) supporting controls, attached properties, x:Name NodeRefs, TwoWay/StringFormat bindings, events, and DataTemplates - Add hierarchical ReactiveScope, provide_context/use_context, safe reactive Command, and async Resource<T> - Add declarative_counter example and integration tests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…d attribute scanning - Replace embedded include_str! in non-test compile_axaml with compile_axaml_from_json so cargo package -p rustolonia-bindgen compiles from its standalone package tarball - Allow quoted string values containing parentheses in ViewModelRustScanner attribute regexes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Marc-André Moreau (mamoreau-devolutions)
merged commit Oct 21, 2026
6f28e39
into
master
10 checks passed
Marc-André Moreau (mamoreau-devolutions)
deleted the
copilot/avalonia-rust-mapping-improvements
branch
October 21, 2026 11:55
Merged
Marc-André Moreau (mamoreau-devolutions)
added a commit
that referenced
this pull request
Oct 26, 2026
Version bump for the next release, generated with `rust/prepare-release.ps1 -Version 12.1.1` (no hand edits). - `rustolonia`, `rustolonia-sys`, `rustolonia-bindgen` → 12.1.1 (plus the exact `rustolonia-sys` pin) - `rust/release-manifest.json` `rustoloniaVersion` and `build/SharedVersion.props` `<Version>` → 12.1.1 - `rust/rustolonia-sys/host-checksums.txt` cleared (refilled from the 12.1.1 build in the next step) - `Cargo.lock` refreshed Includes everything since v12.1.0: #12, #13, #14. After merge, per `rust/PRODUCTIZATION.md#releasing`: 1. Dispatch **Release** from master with `phase=build`, `version=12.1.1`. 2. Run `rust/prepare-release.ps1 -Checksums -SumsFile <SHA256SUMS>` from that run, commit to master, push tag `v12.1.1` on that commit. 3. Dispatch `phase=publish` with `build_run_id` and `version=12.1.1`. The `templates/*/Cargo.toml` still reference `tag = "v12.1.0"` intentionally; they can move to `v12.1.1` once the tag exists. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves the Avalonia-to-Rust authoring surface across both code-first UI and managed AXAML + Rust view-model interop while keeping all published COM IIDs and vtable layouts unchanged:
Upcast<Target>,Downcast<Target>,Deref):#[repr(transparent)]andComPtr<T>#[repr(C)].Deref<Target = ParentType>, staticUpcast<Ancestor>/AsRef<Ancestor>, and safe runtimeDowncast<Sub>(is::<T>(),cast::<T>()) across the control hierarchy, plusobject_id(),same_object(), andNonOwningRef<T>.Fromconversions forThickness,CornerRadius,Size,Point,Vector,Rect,PixelPoint,Color(includingColor::parse_hex),Brush, andPaint.content_text/header_texthelpers and inline attached-property builders (.grid_row(...),.grid_column(...),.dock_panel_dock(...),.canvas_left(...),.tool_tip_tip(...), etc.) on controls.El<T>Builders,rsx!Macro & Reactive Control Flow (Show/For):El<T>descriptors (Control::el(),AppScope::mount_view,mount_into_*,ControlSlot) and thersx!declarative macro supporting attached properties (Grid.row: 1),ref: node_ref,class: "...", string/expression children, andif/forblocks.Show::when/Show::when_elseand keyedFor::each(KeyedListReconciler,.children_for(...),.items_for(...)) that reuse realized controls and update per-itemSignal<T>handles in place.Command& AsyncResource<T>:Copyarena-backedSignal<T>,Memo<T>,Effect,NodeRef<T>,TwoWay<T>,ReactiveScope(with automatic subtree effect disposal),provide_context<T>/use_context<T>,Command::with_can_execute,Resource<T>(AppScope::create_resource),theme_variant_signal,resource_signal,theme_brush, anddata_template_reactivecontainer pooling.IntoValue<T>andIntoProp<T, Marker>soEl<T>setters accept static values, signals, memos, closures, andsignal.two_way().compile_axaml/--compile-axaml):rustolonia-bindgen --compile-axaml <input.axaml> <output.rs>to compile.axamlmarkup into typedEl<T>builders,<ViewName>Refs,<ViewName>Bindings, and<ViewName>Handlers.--scan-rust):reactive_view_model!,prop!,when_any!, andViewModelRustScanner(Avalonia.ViewModelProjection.Tool --scan-rust) supporting#[view_model],#[view_model_enum],#[prop],#[derived],#[collection], and#[command].Validation
cargo test --manifest-path .\rust\Cargo.toml -p rustolonia-bindgen --lockedcargo test --manifest-path .\rust\Cargo.toml -p rustolonia --lockedcargo check --manifest-path .\rust\Cargo.toml -p rustolonia --examples --lockeddotnet build .\projection\Avalonia.ViewModelProjection.Tool\Avalonia.ViewModelProjection.Tool.csproj -c Releasepwsh .\rust\tests\test-build-app.ps1