Swift wrapper for SkiaSharp's C API
See:
- SkiaSharp's C API, which is a fork of Skia, to add more features to the original Skia's C API
- CSkiaSwift
This project uses Swift Package Manager:
- https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md
- https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescription.md
- https://clang.llvm.org/docs/Modules.html
Download SkiaSharp's Skia fork, then see these doc to build:
- https://skia.org/user/download
- https://skia.org/user/build
- https://stackoverflow.com/questions/50228652/how-to-compile-skia-on-windows
- https://github.com/flutter/engine/blob/master/tools/gn
Build static libraries:
bin/gn gen out --args="is_debug=false is_official_build=true \
skia_use_system_expat=false skia_use_system_libjpeg_turbo=false \
skia_use_system_libpng=false skia_use_system_libwebp=false \
skia_use_system_zlib=false skia_use_system_icu=false \
skia_use_system_harfbuzz=false"
ninja -C out
Create symlinks to the built Skia above
(only include/c
and out
directories are used):
cd Sources/CSkia/include
ln -s /path/to/skia/include/c
cd Sources/CSkia
ln -s /path/to/skia/out
Build:
swift build
swift build -c release
Run:
swift run Demo
.build/debug/Demo
.build/release/Demo
Install jazzy, then run:
jazzy --module SkiaSwift