Skip to content
Armin edited this page Jan 20, 2020 · 12 revisions

This is the Wiki for rust-skia, a project to make the Skia C++ library accessible from Rust in a safe way.

Contributing

If you are considering to contribute to rust-skia, the first step is to read the contribution guidelines.

Safe Rust API Conventions & Interfacing Patterns

For adding or updating bindings, the following documents are recommended:

  • Wrapper Types describes the wrapper types we use to interface the more complex Skia types.
  • Simple Types describes how simple types, that are copyable are interfaced.
  • Naming Conventions describes some naming conventions we think are reasonable.
  • Function Signatures contains recommendations to improve function signatures.

Repository Organization

Besides of experimental and PR branches, this repository contains two branches. The master branch is used for development and as the primary PR branch target, and the release branch is used for building and releasing prebuilt binaries on the CI servers.

Release Process

To release a new version of rust-skia, the version numbers in skia-bindings/Cargo.toml and the skia-safe/Cargo.toml need to be increased in the master branch according to Semantic Versioning 2.0.0. Note that in the skia-safe/Cargo.toml the version in the reference to the skia-bindings/Cargo.toml needs to adjusted, too.

After that, the master branch needs to be merged to the release branch. This causes the CI to create binaries in the Releases tab of the GitHub project skia-binaries.

Updating Skia

To update the Skia library that comes with skia-bindings, the following steps are mandatory:

  • Update the submodule.
  • Update the hash and the branch in the README.md, where it points to "pending changes".
  • Update the Skia hash in the [package.metadata] in skia-bindings/Cargo.toml. Keep this hash as short as possible (use git rev-parse --short HEAD), because it's used in file operations that may construct paths that exceed the maximum length on some systems.