Skip to content

Latest commit

 

History

History
 
 

README.md

SkiaSharp Documentation

SkiaSharp is a cross-platform 2D graphics API for .NET that wraps Google's Skia Graphics Library.

Prerequisites

Before building or contributing to SkiaSharp:

  • .NET 8 SDK - Pinned via global.json in the repository root
  • MAUI workload - Required for mobile platform targets:
    dotnet workload install maui

Architecture

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)

Documentation Index

Architecture & Concepts

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

Contributing

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

Building

Document Description
building.md Build on Windows & macOS
building-linux.md Build native libraries for Linux

Releasing

Document Description
releasing.md Complete release guide: branching, workflow, checklist
versioning.md Version numbering scheme

Reference

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

Quick Build

dotnet cake --target=externals-download  # Get native libs
dotnet cake --target=libs                # Build managed
dotnet cake --target=tests               # Run tests

External Resources