review skia-bindings readme and add some words about how to customize the build
@@ -10,13 +10,13 @@ This package has three primary parts. Build support for Skia, the source for the
Building Skia is quite exceptional, a number of prerequisites need to be available and configured properly for the platform it is built for.
-To configure and build Skia, `build_support/skia.rs` does all the hard work: it pulls `depot_tools/` and `skia/` from Google's repositories and pulls in a number of additional dependencies with Python. After that, it configures Skia with [GN](<https://chromium.googlesource.com/chromium/src/tools/gn/+/48062805e19b4697c5fbd926dc649c78b6aaa138/README.md>), and finally builds it by giving control to the `ninja` executable from the `depot_tools/` package.
+To configure and build Skia, `build_support/skia.rs` does all the hard work: it pulls `depot_tools/` and `skia/` from Google's repositories and a number of additional dependencies with Python. After that, it configures Skia with [GN](<https://chromium.googlesource.com/chromium/src/tools/gn/+/48062805e19b4697c5fbd926dc649c78b6aaa138/README.md>), and finally builds it by giving control to the `ninja` executable from the `depot_tools/` package.
### Binding Generation
`src/bindings.cpp` contains the C++ code that Rust needs to speak with Skia's codebase. This file is processed by the [Rust's binding generator](<https://github.com/rust-lang/rust-bindgen>) _and_ compiled by clang.
-If both went well, the Rust binding code is available at `src/bindings.rs`, and the library `skia-bindings` is found in the output directory alongside where Skia was built previously.
+If both went well, the Rust binding code is available at `src/bindings.rs`, and the `skia-bindings` library is found in the output directory alongside where Skia was built previously.
### Prebuilt Binaries
@@ -26,3 +26,15 @@ Whenever a new version of `rust-skia` is built from the `master` branch on our C
And whenever the build script detects that `skia-bindings` is built from inside a crate _and_ a prebuilt archive is available that matches the repository's hash, platform, and features, it downloads the package, unpacks it, and skips the full build step of Skia and the bindings.
+## Build Customization
+
+Besides of the features `vulkan` and `svg` that can be directly specified when the package is added as a cargo dependency, the Skia build can be further customized in `build.rs` by adjusting one of two structs that are defined in `src/build_support/skia.rs`:
+
+### `BuildConfiguration`
+
+This struct represents the top level build configuration for `skia-bindings` and contains a number of individual feature flags.
+
+### `FinalBuildConfiguration`
+
+The `FinalBuildConfiguration` is created from the `BuildConfiguration` and contains the individual name value pairs that are sent to GN to parameterize the Skia build and the preprocessor defines that are used to create the `src/bindings.rs` file and the `skia-bindings` library.
+
