skia-bindings/- Low-level C++ bindings. Contains:skia/- Git submodule pointing torust-skia/skiafork; the tag follows the schemem<milestone>.<ordinal>(seedocs/adr/0002-skia-fork-tags-are-milestone-plus-ordinal.md)src/*.cpp- C wrapper functions for Skia C++ APIs (parsed by bindgen). One file per area, for examplebindings.cpp(core),ganesh.cpp,graphite.cpp,shaper.cpp,skottie.cpp,svg.cpp,vulkan.cpp.Cargo.toml-[package.metadata] skia = "m<milestone>.<ordinal>"must match submodule tagbuild_support/- Build configuration (e.g.binaries_config.rsfor platform-specific logic)
skia-safe/- Safe Rust wrappers overskia-bindings. Mirrors Skia's include structure:src/core/->include/core/src/gpu/ganesh/->include/gpu/ganesh/src/modules/shaper/->modules/skshaper/include/src/modules/paragraph/->modules/skparagraph/include/- etc.
- Bindgen parses the
.cppfiles inskia-bindings/src/to discoverextern "C"functions and types. - Touch
skia-bindings/src/bindings.cppand runcargo check -p skia-bindingsto force regeneration. - Generated bindings land in
target/*/build/skia-bindings-*/out/skia/bindings.rs. - C++
enum classvariants get theirkprefix stripped automatically by bindgen. - C++ namespaced types like
SkShapers::CT::LineBreakModebecomeSkShapers_CT_LineBreakMode.
- Enum wrapping:
pub type Foo = skia_bindings::SkFoo;+variant_name!(Foo::SomeVariant); - Struct wrapping:
pub type Foo = Handle<SkFoo>;orpub type Foo = RCHandle<SkFoo>; - native_transmutable! for types that are bit-for-bit compatible.
- require_type_equality! to verify base class assumptions at compile time (e.g.
SkPixelRef_INHERITED==SkRefCnt). - variant_name! to verify a variant exists at compile time (catches bindgen name changes).
- Platform-gated code uses
#[cfg(any(target_os = "macos", target_os = "ios"))]. - Functions returning
Option<Self>viaSelf::from_ptr(unsafe { ... })- returnsNoneif the C function returns null (used for platform-optional features like CoreText).
Task skills live in .github/skills/, and .claude/skills/ links to them for Claude Code. Read
the matching SKILL.md before a bindings change, a milestone update, or a release.
Every Skia fork tag cut — a new milestone, a refresh from upstream, or a new fork patch — follows
.github/skills/skia-milestone-update/SKILL.md. Versioning in short: crates are 0.XX.0 for
milestone mXX; a same-milestone cut takes the next tag ordinal and keeps the crate version.
Fork patches are named rust-skia: <summary>.
just diff-skia range-diffs the fork patch stack of the submodule checkout (every commit on top of
upstream/chrome/mXX) against the stack master records; it needs the upstream remote
(google/skia) with both milestone branches fetched. It answers whether the fork patches match
master; include/API diffs between milestones use direct
git -C skia-bindings/skia diff OLD_TAG..NEW_TAG -- ... commands.
For rust-skia release notes format and authoring rules, use:
.github/release-notes-guidelines.md