SkiaSharp is a cross-platform 2D graphics API for .NET that wraps Google's Skia Graphics Library.
Before building or contributing to SkiaSharp:
- .NET 8 SDK - Pinned via
global.jsonin the repository root - MAUI workload - Required for mobile platform targets:
dotnet workload install maui
C# Wrapper (binding/SkiaSharp/) → P/Invoke → C API (externals/skia/src/c/) → C++ Skia
Key principles:
- C# is the safety boundary (validates parameters, throws exceptions)
- C API is minimal pass-through (trusts C#, returns bool/null on failure)
- Three pointer types: raw (borrowed), owned (delete), ref-counted (unref)
| Document | Description |
|---|---|
| architecture.md | Three layers, type mappings, call flow, threading |
| memory-management.md | Pointer types, ownership, lifecycle |
| error-handling.md | Error patterns across layers |
| Document | Description |
|---|---|
| adding-apis.md | Step-by-step guide to add bindings |
| adding-libraries.md | Adding new projects and NuGet packages |
| writing-docs.md | API documentation process |
| maintaining.md | Maintainer responsibilities |
| Document | Description |
|---|---|
| building.md | Build on Windows & macOS |
| building-linux.md | Build native libraries for Linux |
| Document | Description |
|---|---|
| releasing.md | Complete release guide: branching, workflow, checklist |
| versioning.md | Version numbering scheme |
| Document | Description |
|---|---|
| dependencies.md | Native dependencies: security relevance, CVE tracking, cgmanifest.json |
| debugging-methodology.md | Best practices for complex debugging |
| linux-assets.md | Linux native package information |
dotnet cake --target=externals-download # Get native libs
dotnet cake --target=libs # Build managed
dotnet cake --target=tests # Run tests