utils/README.md
This directory contains a few tools to help with the binding and development of SkiaSharp and related libraries.
This is a small set of tools that help with generating the p/invoke layer from the C header files.
Regenerate all P/Invoke bindings:
pwsh ./utils/generate.ps1
Regenerate a specific binding:
pwsh ./utils/generate.ps1 -Config libSkiaSharp.json
Available configs:
libSkiaSharp.json - Core SkiaSharplibSkiaSharp.Skottie.json - Skottie animationlibSkiaSharp.SceneGraph.json - Scene graphlibSkiaSharp.Resources.json - ResourceslibHarfBuzzSharp.json - HarfBuzz text shapingThis can be run with:
dotnet run --project=utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj -- verify --config binding/libSkiaSharp.json --skia externals/skia
--config binding/libSkiaSharp.json--skia externals/skia--output binding/Binding/SkiaApi.generated.csThis can be run with:
dotnet run --project=utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj -- cookie --assembly binding\SkiaSharp\bin\Debug\netstandard2.0\SkiaSharp.dll --type "SkiaSharp.SkiaApi"
Or:
dotnet run --project=utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj -- cookie --assembly binding\HarfBuzzSharp\bin\Debug\netstandard2.0\HarfBuzzSharp.dll --type "HarfBuzzSharp.HarfBuzzApi"
--assembly <assembly>--type <full type name>Run the WASM unit tests in a browser.
This can be run with:
dotnet run --project=utils/WasmTestRunner/WasmTestRunner.csproj -- "http://localhost:5000/"
--output TestResults.xml--timeout 30--no-headless