From 6849f6094d7bc533e9e0f50b720dec59e44850bd Mon Sep 17 00:00:00 2001 From: Michael Thyregod <2386496+michaelthyregod@users.noreply.github.com> Date: Mon, 9 Nov 2026 05:06:19 +0100 Subject: [PATCH 1/2] Make the library trim and Native AOT compatible - Mark the net8.0 and net10.0 targets IsAotCompatible, so the trim and AOT analyzers run on every build, with the same KnownILLinkPack override as AngleSharp, AngleSharp.Xml, AngleSharp.Css and AngleSharp.Io - Update AGENTS.md and CHANGELOG.md No code changes were needed: both targets build without trim or AOT warnings, and a console app published with PublishAot (runtime API, DOM bridge, host imports, CompileError) compiles without warnings, Wasmtime included, and runs correctly. --- AGENTS.md | 3 +++ CHANGELOG.md | 4 ++++ src/AngleSharp.Wasm/AngleSharp.Wasm.csproj | 14 ++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index a9feabf..97bbacb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,6 +19,9 @@ AngleSharp.Wasm extends AngleSharp with WebAssembly execution and a DOM/JavaScri - The solution is `src/AngleSharp.Wasm.sln`. - The library and test projects target `net8.0` and `net10.0`. - The library references AngleSharp 1.x and Wasmtime 44.0.0. +- The library sets `IsAotCompatible`, so a trim or AOT analyzer warning breaks the build. Avoid + reflection over runtime types; the analyzers only see this assembly, so publishing a small + `PublishAot` console app against it is the end-to-end check. - The default runtime is `WasmtimeWasmRuntime`, registered through `Configuration.WithWasm()`. - `global.json`, when present, controls the SDK version used by the build wrapper. diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd4982..22a905e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.1.1 + +- Added trimming and Native AOT compatibility (`IsAotCompatible`) for the .NET 8 and .NET 10 targets @michaelthyregod + # 1.1.0 Released on Friday, August 21 2026. diff --git a/src/AngleSharp.Wasm/AngleSharp.Wasm.csproj b/src/AngleSharp.Wasm/AngleSharp.Wasm.csproj index 8bd909b..868bf5f 100644 --- a/src/AngleSharp.Wasm/AngleSharp.Wasm.csproj +++ b/src/AngleSharp.Wasm/AngleSharp.Wasm.csproj @@ -4,8 +4,22 @@ AngleSharp.Wasm net8.0;net10.0 true + + true + + + + + https://anglesharp.github.io MIT From 563d1c339e0acf8af64c504b8fb79c5a0d3601f9 Mon Sep 17 00:00:00 2001 From: Michael Thyregod <2386496+michaelthyregod@users.noreply.github.com> Date: Mon, 9 Nov 2026 05:21:17 +0100 Subject: [PATCH 2/2] Add the PR number to the CHANGELOG line --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22a905e..5245b8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # 1.1.1 -- Added trimming and Native AOT compatibility (`IsAotCompatible`) for the .NET 8 and .NET 10 targets @michaelthyregod +- Added trimming and Native AOT compatibility (`IsAotCompatible`) for the .NET 8 and .NET 10 targets (#17) @michaelthyregod # 1.1.0