Skip to content

Add CI Native AOT gate and document AOT compatibility - #17

Merged
valentino-saitz-optris merged 1 commit into
masterfrom
chore/aot-compliance-ci
Jun 16, 2026
Merged

Add CI Native AOT gate and document AOT compatibility#17
valentino-saitz-optris merged 1 commit into
masterfrom
chore/aot-compliance-ci

Conversation

@valentino-saitz-optris

Copy link
Copy Markdown
Collaborator

What

The library is already Native-AOT & trim compatible — this PR verifies that, guards it against regressions, and advertises it. No production code changes were required.

Verification (already compliant)

  • AOT-published the demo consumer (PublishAot=true, win-x64): the entire trimmed graph (library + compiled XAML + Avalonia) produced a single self-contained native .exe with zero IL2xxx/IL3xxx/AVLN trim/AOT warnings and no managed runtime DLLs in the publish folder.
  • Ran the native binary — the demo window opens and animates, confirming the static ctor's enum-keyed theme lookup, compiled XAML bindings, and animations all work after trimming.
  • Static audit (C# + all 12 XAML files + config): generic AOT-safe Enum APIs, every {Binding} typed via $parent[c:LoadingIndicator] (compiled, never reflection), no runtime reflection.

Changes

  • .github/workflows/test.yml — new aot job installs the Linux native toolchain (clang, zlib1g-dev) and AOT-publishes the demo, failing on any IL#### trim/AOT warning. A library's AOT warnings only surface when a consuming app is AOT-published, so this is the authoritative regression guard.
  • README.md — new "Trimming & Native AOT" section.
  • LoadingIndicators.Avalonia.csproj — note trim/AOT compatibility in the package <Description> and add AOT, trimming to <PackageTags>.

🤖 Generated with Claude Code

The library is already Native-AOT and trim compatible: AOT-publishing the
demo consumer produces a single native binary with zero IL2xxx/IL3xxx
warnings, and the binary runs. Lock that in and advertise it:

- test.yml: new `aot` job AOT-publishes the demo and fails on any IL####
  trim/AOT warning. A library's AOT warnings only surface when a consuming
  app is AOT-published, so this is the authoritative regression guard.
- README: add a "Trimming & Native AOT" section.
- csproj: note trim/AOT compatibility in the package description and tags.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@valentino-saitz-optris
valentino-saitz-optris merged commit a89ddc2 into master Jun 16, 2026
5 checks passed
@valentino-saitz-optris
valentino-saitz-optris deleted the chore/aot-compliance-ci branch June 16, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant