Back to Skiasharp

SkiaSharp Documentation

documentation/README.md

3.119.22.6 KB
Original Source

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:
    bash
    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

DocumentDescription
architecture.mdThree layers, type mappings, call flow, threading
memory-management.mdPointer types, ownership, lifecycle
error-handling.mdError patterns across layers

Contributing

DocumentDescription
adding-apis.mdStep-by-step guide to add bindings
adding-libraries.mdAdding new projects and NuGet packages
writing-docs.mdAPI documentation process
maintaining.mdMaintainer responsibilities

Building

DocumentDescription
building.mdBuild on Windows & macOS
building-linux.mdBuild native libraries for Linux

Releasing

DocumentDescription
releasing.mdComplete release guide: branching, workflow, checklist
versioning.mdVersion numbering scheme

Reference

DocumentDescription
dependencies.mdNative dependencies: security relevance, CVE tracking, cgmanifest.json
debugging-methodology.mdBest practices for complex debugging
linux-assets.mdLinux native package information

Quick Build

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

External Resources