Contributing to SkiaSharp
March 25, 2026 ยท View on GitHub
Thank you for your interest in contributing to SkiaSharp! This document provides guidelines for submitting issues and pull requests.
๐ Documentation
Before contributing, please review:
- documentation/dev/ - Architecture, memory management, and contributor guides
- documentation/dev/adding-apis.md - Complete guide for adding APIs
- documentation/dev/building.md - Build instructions
๐ Reporting Issues
If you think you've found a bug, please check the Issues page first to see if an issue has already been filed. This helps reduce duplicate reports.
Before Submitting
- Validate that the issue is not resolved with the latest stable, pre-release, or nightly builds
- Create a minimal reproduction project using only the code necessary to reproduce the issue
- Clean your solution before compressing:
- Delete all
bin/andobj/folders - Remove the
packages/folder - Example structure to clean:
[ProjectRoot]/ProjectName/bin [ProjectRoot]/ProjectName/obj [ProjectRoot]/ProjectName.Android/bin [ProjectRoot]/ProjectName.Android/obj [ProjectRoot]/ProjectName.iOS/bin [ProjectRoot]/ProjectName.iOS/obj [ProjectRoot]/ProjectName.UWP/bin [ProjectRoot]/ProjectName.UWP/obj
- Delete all
When Submitting Issues
- Platform information: Note if the issue occurs only on specific platforms
- Regressions: If applicable, identify the last working build version
- Device specifics: Some issues occur only on specific:
- Device types (phones, tablets, desktops)
- OS versions
- Target SDK versions
- Physical devices vs simulators/emulators
- Upload reproductions: Attach reproduction projects directly to the issue (don't use external file sharing)
๐ง Contributing Code
We greatly welcome PRs with fixes and improvements from the community!
Pull Request Guidelines
- Follow existing patterns - Study similar APIs before adding new ones
- Add tests - All new features and bug fixes should include tests
- Update documentation - If you're changing public APIs
- Memory management - Ensure proper disposal and pointer type handling (see documentation/dev/memory-management.md)
- Error handling - Validate parameters and handle errors appropriately (see documentation/dev/error-handling.md)
Adding New APIs
Follow the comprehensive guide in documentation/dev/adding-apis.md, which covers:
- Analyzing C++ APIs and identifying pointer types
- Creating C API wrappers
- Writing P/Invoke declarations
- Implementing C# wrapper classes
- Testing your changes
Code Standards
- Dispose pattern: Always use
usingstatements in samples and tests - Parameter validation: Validate all parameters in C# before P/Invoke
- Error checking: Check return values from C API calls
- Memory safety: Understand pointer types (see documentation/dev/memory-management.md)
- Naming conventions: Follow existing naming patterns (see documentation/dev/architecture.md)
๐๏ธ Building SkiaSharp
Prerequisites
- .NET 8 SDK - The repo is pinned via
global.json - MAUI workload - Required for mobile targets:
dotnet workload install maui
Quick Build (Managed Only)
If you're only making changes to managed code:
# Download pre-built native libraries
dotnet cake --target=externals-download
# Build managed libraries
dotnet cake --target=libs
# Run tests
dotnet cake --target=tests
Quick Validation (Console Tests)
For faster iteration when working on binding code:
dotnet build tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj
dotnet test tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj
See documentation/dev/building.md for complete build instructions.
Full Build (Including Native)
For native code changes, see:
- documentation/dev/building.md - Windows & macOS
- documentation/dev/building-linux.md - Linux
๐ Additional Resources
- documentation/dev/ - Complete collection of contributor documentation
- Maintainer guides - See documentation/dev/maintaining.md
- Release process - See documentation/dev/releasing.md
๐ก Questions?
- Architecture questions: Review documentation/dev/
- Build issues: Check documentation/dev/building.md
- API usage: Check the API documentation
- Still stuck? Open an issue with your question
๐ Thank You!
Your contributions make SkiaSharp better for everyone. We appreciate your time and effort!