Static library of ANGLE for Avalonia UI
A sample project here: https://github.com/peaceshi/Avalonia-NativeAOT-SingleFile
This builds AvaloniaUI's ANGLE fork, not upstream google/angle, pinned in
.github/workflows/build.yml:
| Repo | https://github.com/AvaloniaUI/angle.git |
| Branch | avalonia-fork-master |
| Commit | 1c89805903c1482166356d3b950d474973180e61 |
That commit is what Avalonia actually ships: Avalonia 12.1.2 resolves
Avalonia.Angle.Windows.Natives 2.1.27548.20260419, and its av_libglesv2.dll reports
2.1.1 git hash: 1c89805903c1. Since this package exists to replace that DLL with a static link,
it has to be the same source.
SkiaSharp does not determine this version. third_party/externals/angle2 is commented out in
mono/skia, so SkiaSharp builds no ANGLE and pins no revision — matching a SkiaSharp version here
would be meaningless.
- Check the
av_libglesv2.dllshipped by the target Avalonia version (FileVersioncarries the git hash) and find the matching commit onavalonia-fork-master. - Update
ANGLE_Repo/ANGLE_Ref/ANGLE_Commit/ANGLE_CommitShort/ANGLE_Version. - Regenerate both version-specific artifacts against the new commit — they are not portable
between revisions:
BUILD.gn— the fork'sBUILD.gnplus two edits: an addedlibANGLE_statictarget, andcomplete_static_lib = trueonlibGLESv2_static. Record withgit diff --patch > patch/avalonia-fork-master.patch.patch/avalonia-fork-master-deps.patch— dropscatapult,dawn,llvm/src,SwiftShaderandVK-GL-CTSfromDEPSsogclient syncstays small.
Note the fork defines no libANGLE_with_capture target, so unlike the old upstream setup there is
no libANGLE_with_capture_static; adding one would reference an undefined target and fail gn gen.
libEGL_static is built and packaged alongside the GLES libraries because the fork's libGLESv2
exports no egl* entry points (they live in src/libEGL/libEGL_autogen.def), and Avalonia
P/Invokes EGL.