Skip to content

[WASM] Drop native builds for pre-.NET 8 Emscripten versions - #4022

Merged
mattleibow merged 4 commits into
mainfrom
mattleibow/drop-wasm-pre-net8
May 21, 2026
Merged

mattleibow merged 4 commits into
mainfrom
mattleibow/drop-wasm-pre-net8

Conversation

@mattleibow

@mattleibow mattleibow commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The WASM native build for Emscripten 2.0.6 was intermittently hanging in CI, and the older Emscripten versions target EOL runtimes. This PR removes all WASM native build jobs and NuGet package assets for Emscripten versions below 3.1.34 (.NET 8):

Emscripten .NET Version Reason for removal
2.0.6 None (legacy) No .NET release, intermittent CI hangs
2.0.23 .NET 6 (EOL) Runtime EOL Nov 2024
3.1.7 None (legacy) No .NET release
3.1.12 .NET 7 (EOL) Runtime EOL May 2024

Retained: Emscripten 3.1.34 (.NET 8) and 3.1.56 (.NET 9/10/11) with all st/mt/simd variants.

Changes

CI Pipeline

  • Removed 7 build jobs from azure-templates-stages-native-wasm.yml (15 → 8 jobs, ~47% reduction)
  • Removed corresponding artifact names from azure-templates-stages-native-merge.yml

NuGet Package Targets

  • Removed old NativeFileReference entries from SkiaSharp.NativeAssets.WebAssembly and HarfBuzzSharp.NativeAssets.WebAssembly buildTransitive targets
  • Added MSBuild error guard: consumers targeting < net8.0 on Blazor WASM or Uno Platform WASM now get a clear build error instead of silently getting no native library

Internal Targets

  • Cleaned IncludeNativeAssets.SkiaSharp.targets and IncludeNativeAssets.HarfBuzzSharp.targets

Documentation

  • Updated documentation/dev/packages.md to reflect net8.0+ WASM native requirement

What's NOT changed

  • SkiaSharp.Views.Blazor.csproj still ships managed assemblies for net6.0 (via TFMBase) — the managed code compiles fine, only native WASM linking requires net8.0+
  • All net8+ builds (3.1.34, 3.1.56 with st/mt/simd variants) are unchanged

mattleibow and others added 2 commits May 20, 2026 20:55
….12)

Remove native WASM build targets for .NET 5/6/7 which used Emscripten
versions 2.0.6, 2.0.23, 3.1.7, and 3.1.12. These .NET versions are all
end-of-life. The WASM pipeline now only builds for:

- .NET 8: Emscripten 3.1.34 (st, mt, simd, mt+simd)
- .NET 9+: Emscripten 3.1.56 (st, mt, simd, mt+simd)

This reduces the WASM CI matrix from 15 jobs to 8, and eliminates the
hanging build caused by Emscripten 2.0.6.

Files changed:
- scripts/azure-templates-stages-native-wasm.yml: removed 7 old build entries
- binding/SkiaSharp.NativeAssets.WebAssembly/buildTransitive/SkiaSharp.targets
- binding/HarfBuzzSharp.NativeAssets.WebAssembly/buildTransitive/HarfBuzzSharp.targets
- binding/IncludeNativeAssets.SkiaSharp.targets
- binding/IncludeNativeAssets.HarfBuzzSharp.targets

Co-authored-by: Copilot <[email protected]>
Consumers targeting net6.0 or net7.0 Blazor/WASM will now receive a
clear build error instead of silently getting no native library linked.
The SkiaSharp.Views.Blazor package still ships net6.0 managed assemblies
(via TFMBase), but the native WASM binaries are only available for
net8.0+.

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4022

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4022"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4022/packages --name skiasharp-pr-4022
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4022

- Remove old WASM artifact names from native merge pipeline
  (azure-templates-stages-native-merge.yml) that no longer exist
- Extend the pre-net8.0 error guard to also cover Uno Platform WASM
  consumers (IsUnoHead + UnoRuntimeIdentifier == WebAssembly)

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

The documentation for this PR has been deployed and is available at:

🔗 View Staging Site
🔗 View Staging Docs
🔗 View Staging Gallery (Blazor)
🔗 View Staging Gallery (Uno Platform)
🔗 View Staging SkiaFiddle

This preview will be updated automatically when you push new commits to this PR.


This comment is automatically updated by the documentation staging workflow.

@mattleibow
mattleibow marked this pull request as ready for review May 21, 2026 00:08
@mattleibow mattleibow changed the title Drop WASM native builds for pre-.NET 8 (Emscripten 2.0.6, 2.0.23, 3.1.7, 3.1.12) [WASM] Drop native builds for pre-.NET 8 Emscripten versions May 21, 2026
@mattleibow
mattleibow merged commit 969f53f into main May 21, 2026
5 of 6 checks passed
@mattleibow
mattleibow deleted the mattleibow/drop-wasm-pre-net8 branch May 21, 2026 00:09
github-actions Bot pushed a commit that referenced this pull request May 21, 2026
mattleibow added a commit that referenced this pull request May 22, 2026
…ne (#4045)

[CI] Fix native build failures on release/3.119.x (#4045)

Context: #4014, #4022, #3743, #4013

Four independent CI failures were blocking all builds on the 3.119.x
release branch. Each fix is backported from main and adapted to the
older file layout (scripts/ vs scripts/infra/).

~~ ANGLE WinAppSDK download (WinError 10013) ~~

DevDiv 1ES agents block Python's urllib from making outbound HTTPS
connections. Replace the winappsdk_setup.py invocation with a Cake
DownloadFile() from dnceng's dotnet-public feed, followed by a new
PowerShell script (generate_winappsdk_headers.ps1) that runs winmdidl
+ midlrt to produce the C++ headers ANGLE needs.

~~ WASM Emscripten 2.0.6 hang ~~

The 2.0.6 build intermittently hangs in CI. No .NET release ever
consumed this version — it was a legacy artifact from early
experimentation. Remove it from the matrix and merge lists.

~~ Tizen SDK 6.1 permanently broken ~~

Samsung rebranded Tizen Studio to Tizen SDK starting with version 10.0
and the old 6.1 Certificate-Manager package fails deterministically
with NoClassDefFoundError. Update to SDK 10.0 with the new URL pattern.

~~ Alpine apk.static transient download failures ~~

GitLab returns intermittent HTTP 5xx for apk.static. Without --fail,
curl silently saves the error body and the script tries to chmod +x a
JSON string. Add --fail --retry 5 --retry-delay 10 --retry-all-errors.

Co-authored-by: Copilot <[email protected]>
mattleibow added a commit that referenced this pull request May 22, 2026
…ne (#4045)

[CI] Fix native build failures on release/3.119.x (#4045)

Context: #4014, #4022, #3743, #4013

Four independent CI failures were blocking all builds on the 3.119.x
release branch. Each fix is backported from main and adapted to the
older file layout (scripts/ vs scripts/infra/).

~~ ANGLE WinAppSDK download (WinError 10013) ~~

DevDiv 1ES agents block Python's urllib from making outbound HTTPS
connections. Replace the winappsdk_setup.py invocation with a Cake
DownloadFile() from dnceng's dotnet-public feed, followed by a new
PowerShell script (generate_winappsdk_headers.ps1) that runs winmdidl
+ midlrt to produce the C++ headers ANGLE needs.

~~ WASM Emscripten 2.0.6 hang ~~

The 2.0.6 build intermittently hangs in CI. No .NET release ever
consumed this version — it was a legacy artifact from early
experimentation. Remove it from the matrix and merge lists.

~~ Tizen SDK 6.1 permanently broken ~~

Samsung rebranded Tizen Studio to Tizen SDK starting with version 10.0
and the old 6.1 Certificate-Manager package fails deterministically
with NoClassDefFoundError. Update to SDK 10.0 with the new URL pattern.

~~ Alpine apk.static transient download failures ~~

GitLab returns intermittent HTTP 5xx for apk.static. Without --fail,
curl silently saves the error body and the script tries to chmod +x a
JSON string. Add --fail --retry 5 --retry-delay 10 --retry-all-errors.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant