Skip to content

Improve NuGet package READMEs - #4714

Merged
mattleibow merged 4 commits into
mainfrom
mattleibow-improve-nuget-readmes
Aug 20, 2026
Merged

mattleibow merged 4 commits into
mainfrom
mattleibow-improve-nuget-readmes

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Description

NuGet package READMEs were generated from the short PackageDescription, leaving every package page with little more than one sentence. This adds polished, package-specific onboarding for the five primary packages (SkiaSharp, HarfBuzzSharp, SkiaSharp.Views, SkiaSharp.Views.Maui.Controls, and SkiaSharp.Views.Blazor) with capabilities, installation, working examples, package selection, Microsoft Learn/API links, DocFX guides, the live Blazor Gallery, SkiaFiddle, support, and contribution information.

Each rich PACKAGE-README.md is co-located with its project. The shared packaging target discovers that convention and generates a professional fallback README for the other 36 packable projects. Package-specific guidance is expressed through explicit MSBuild properties: native-assets metadata lives in NativeAssets.Build.targets, while infrastructure-package notices live in their projects. Native package descriptions and two incorrect SceneGraph/Resources descriptions are also corrected.

Related issues

None.

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — package documentation and NuGet metadata only; no public API or runtime behavior changes.

Testing

  • Generated and inspected README.md for all 41 packable projects: 5 co-located custom READMEs and 36 generated fallbacks.
  • Packed representative SkiaSharp and SkiaSharp.NativeAssets.Linux.NoDependencies NuGets and verified the embedded README, <readme> metadata, concise native package description, and package-notes placement.
  • Checked all 52 links in the custom package READMEs and validated Markdown structure/code fences.
  • Ran dotnet test tests/SkiaSharp.Tests.Console.slnx -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0. The SingletonInit, Direct3D, and Vulkan hosts passed. In the core host, 6,098 passed and 23 skipped; two transient stream/GC failures passed when rerun in isolation. The existing local ganesh-gl/DiagonalLines golden comparison remains outside tolerance on this Mac (1,832 pixels versus 1,310 allowed); all other focused visual cases passed (19 passed, 5 skipped). This PR does not change rendering code or golden images.

No tests were added because the change is package documentation and shared pack metadata; the package-generation and packed-artifact checks above cover the changed behavior.

Checklist

  • Tests added or updated (if omitted, explain why above)
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Filed a docs issue in mono/SkiaSharp-API-docs so reference docs can be written later
  • Native change? Companion mono/skia PR linked above and bindings regenerated

Add co-located onboarding READMEs for the primary SkiaSharp, HarfBuzzSharp, MAUI, Blazor, and native views packages. Generate a professional fallback for every other packable project, with explicit native-asset and infrastructure guidance.

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

github-actions Bot commented Aug 8, 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 -- 4714

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4714/packages --name skiasharp-pr-4714
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-4714

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4714

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 23 slower · 🟢 16 faster

  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 256) · Windows · 182.7 ns → 375.6 ns (+106%)
  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 4096) · Windows · 2.10 µs → 3.66 µs (+74%)
  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · Windows · 96.45 µs → 129.70 µs (+34%)
  • 🟢 RuntimeEffectShaderBenchmark.DrawFrame · Windows · 1.22 ms → 838.05 µs (-31%)
  • 🟢 ColorMathBenchmark.UnPreMultiply(Colors: 4096) · Windows · 12.79 µs → 9.56 µs (-25%)
  • …and 34 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.10)

Benchmark baseline this PR Δ
ColorMathBenchmark.PreMultiply(Colors: 4096) 12.87 µs 14.08 µs 🔴 +9%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 100.53 µs 108.85 µs 🔴 +8%
ColorMathBenchmark.ToColor(Colors: 4096) 14.99 µs 14.12 µs 🟢 -6%

Windows

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.10)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoints(Points: 256) 182.7 ns 375.6 ns 🔴 +106%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.10 µs 3.66 µs 🔴 +74%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 96.45 µs 129.70 µs 🔴 +34%
RuntimeEffectShaderBenchmark.DrawFrame 1.22 ms 838.05 µs 🟢 -31%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 12.79 µs 9.56 µs 🟢 -25%
ColorMathBenchmark.PreMultiply(Colors: 4096) 14.74 µs 11.06 µs 🟢 -25%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 238.66 µs 290.82 µs 🔴 +22%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 5.42 µs 4.51 µs 🟢 -17%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 86.67 µs 73.09 µs 🟢 -16%
MatrixOpsBenchmark.Concat(Count: 4096) 256.01 µs 216.74 µs 🟢 -15%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 361.89 µs 311.52 µs 🟢 -14%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.84 ms 2.46 ms 🟢 -13%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 969.18 µs 842.76 µs 🟢 -13%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.34 ms 1.17 ms 🟢 -13%
MatrixOpsBenchmark.Invert(Count: 4096) 148.24 µs 129.87 µs 🟢 -12%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 11.24 ms 9.87 ms 🟢 -12%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 257.66 µs 226.75 µs 🟢 -12%
ColorMathBenchmark.ToColorF(Colors: 4096) 14.14 µs 15.51 µs 🔴 +10%
MatrixMapPointsBenchmark.MapVector(Points: 256) 8.88 µs 8.37 µs 🟢 -6%
ColorMathBenchmark.ToColor(Colors: 4096) 11.93 µs 11.26 µs 🟢 -6%

macOS

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.10)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 66.42 µs 81.42 µs 🔴 +23%
MatrixOpsBenchmark.Invert(Count: 4096) 65.06 µs 77.01 µs 🔴 +18%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 141.56 µs 167.41 µs 🔴 +18%
PathBoundsBenchmark.TightBounds(Points: 64) 850.3 ns 1.00 µs 🔴 +18%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 97.96 µs 112.29 µs 🔴 +15%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.18 ms 1.32 ms 🔴 +12%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.52 µs 1.70 µs 🔴 +12%
PathBoundsBenchmark.TightBounds(Points: 1024) 8.07 µs 9.04 µs 🔴 +12%
MatrixOpsBenchmark.Concat(Count: 4096) 111.66 µs 124.47 µs 🔴 +11%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 5.40 ms 6.00 ms 🔴 +11%
RuntimeEffectShaderBenchmark.DrawFrame 507.38 µs 559.46 µs 🔴 +10%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 39.10 µs 43.01 µs 🔴 +10%
ColorParseBenchmark.Parse(Iterations: 1000) 63.10 µs 69.34 µs 🔴 +10%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 148.63 µs 162.64 µs 🔴 +9%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 49.43 µs 53.88 µs 🔴 +9%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.45 ms 1.55 ms 🔴 +7%

📈 Full interactive perf-dashboard & run details →

@github-actions

github-actions Bot commented Aug 8, 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.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: f47daf0f-e6a0-4da6-b113-afd36f216acb
@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

📦 Artifact size report

Packages from this PR (build 1560199) vs the latest nightly baseline 4.152.0-nightly.17 (observed 2026-08-19).

Total .nupkg size: 569.8 MB → 569.3 MB (−582.4 KB, -0.1%)

Packages

⚠️ marks growth over 500.0 KB or 2%. Changes under 50.0 KB are treated as noise.

Package baseline this PR Δ Δ%
SkiaSharp.NativeAssets.WinUI 109.1 MB 108.5 MB 🟢 −667.4 KB -0.6%
SkiaSharp.NativeAssets.WebAssembly 69.7 MB 69.7 MB 🔴 +81.3 KB +0.1%

+38 package(s) unchanged (< 50.0 KB).

Per-file changes

SkiaSharp.NativeAssets.WebAssembly

File Size
README.md 219 B → 1.9 KB (🔴 +1.7 KB)

SkiaSharp.NativeAssets.WinUI

File Size
runtimes/win-arm64/native/libGLESv2.pdb 64.5 MB → 64.4 MB (🟢 −64.0 KB)
runtimes/win-x64/native/libGLESv2.pdb 66.6 MB → 66.6 MB (🟢 −48.0 KB)
runtimes/win-x86/native/libGLESv2.pdb 67.2 MB → 67.2 MB (🟢 −48.0 KB)
README.md 219 B → 1.9 KB (🔴 +1.7 KB)

Informational only — this never blocks the PR. Native binaries are labelled by os/arch.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: f47daf0f-e6a0-4da6-b113-afd36f216acb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves NuGet onboarding with package-specific and generated README content.

Changes:

  • Adds five rich package READMEs.
  • Generates fallback READMEs for other packages.
  • Refines native-assets notices and package descriptions.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
source/SkiaSharp.Views/SkiaSharp.Views/PACKAGE-README.md Documents native platform views.
source/SkiaSharp.Views/SkiaSharp.Views.Desktop.Common/SkiaSharp.Views.Desktop.Common.csproj Adds an infrastructure-package notice.
source/SkiaSharp.Views/SkiaSharp.Views.Blazor/PACKAGE-README.md Adds Blazor onboarding and example.
source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/SkiaSharp.Views.Maui.Core.csproj Directs users to the MAUI Controls package.
source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls/PACKAGE-README.md Adds MAUI setup and drawing guidance.
source/SkiaSharp.NuGet.targets Implements custom and fallback README generation.
binding/SkiaSharp/PACKAGE-README.md Adds core SkiaSharp onboarding.
binding/SkiaSharp.SceneGraph/SkiaSharp.SceneGraph.csproj Revises SceneGraph metadata.
binding/SkiaSharp.Resources/SkiaSharp.Resources.csproj Corrects resource-provider description.
binding/NativeAssets.Build.targets Adds native-assets README metadata.
binding/HarfBuzzSharp/PACKAGE-README.md Adds HarfBuzzSharp onboarding.
binding/Directory.Build.targets Adds HarfBuzz-specific resource links.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: f47daf0f-e6a0-4da6-b113-afd36f216acb
@mattleibow
mattleibow merged commit f983d73 into main Aug 20, 2026
20 of 49 checks passed
@mattleibow
mattleibow deleted the mattleibow-improve-nuget-readmes branch August 20, 2026 02:40
@github-actions github-actions Bot added this to the 4.152.0-rc.1 milestone Sep 7, 2026
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.

3 participants