[package]

name = "skia-bindings"
description = "Skia Bindings for Rust"
homepage = "https://github.com/rust-skia/rust-skia/tree/master/skia-bindings"
repository = "https://github.com/rust-skia/rust-skia"
readme = "README.md"
keywords = ["skia", "rust-bindings", "vulkan", "opengl", "pdf"]
categories = ["external-ffi-bindings", "graphics", "multimedia::images", "rendering::graphics-api", "visualization"]
license = "MIT"

version = "0.97.0"
authors = ["LongYinan <lynweklm@gmail.com>", "Armin Sander <armin@replicator.org>"]
edition = "2021"
rust-version.workspace = true
build = "build.rs"
links = "skia"
include = [
	"Cargo.toml",
	"bindings_docs.rs",
	"build.rs",
	"build_support.rs",
	"build_support/**/*.rs",
	"src/**/*.h",
	"src/**/*.cpp",
	"src/*.rs" ]

[lib]
doctest = false

# Metadata used from inside the packaged crate that defines where to download the Skia archive from.
# Note: use short hashes here because of filesystem path size restrictions.
[package.metadata]
skia = "m148-0.95.2"

[features]
default = ["binary-cache", "embed-icudtl", "pdf"]
gl = []
egl = []
wayland = []
x11 = []
vulkan = []
metal = []
d3d = []
textlayout = []
webp = ["webp-encode", "webp-decode"]
webp-encode = []
webp-decode = []
pdf = ["jpeg"]
# sys libraries
use-system-jpeg-turbo = ["dep:mozjpeg-sys"]
# `textlayout` because `SkSVGTextContext::SkSVGTextContext()` invokes `SkShaper::Make`.
svg = ["textlayout"]
skottie = ["textlayout"]
binary-cache = ["dep:flate2", "dep:tar"]
embed-icudtl = []
embed-freetype = []
freetype-woff2 = []
# Panic when any compilation steps are required to run. 
# See <https://github.com/rust-skia/rust-skia/pull/1121>.
no-compile = []

jpeg = ["jpeg-encode", "jpeg-decode"]
jpeg-encode = []
jpeg-decode = []

[dependencies]
mozjpeg-sys = { version = "2", features = ["with_simd"], optional = true }

[build-dependencies]
cc = { version = "1.1.28" }
bindgen = { version = "0.72.0" }
pkg-config = "0.3.32"

# For enum variant name replacements.
regex = "1.12.3"
heck = "0.5.0"

flate2 = { version = "1.0.7", optional = true }
tar = { version = "0.4.45", optional = true }

# For reading .cargo.vcs_info.json to get the repository sha1 that is used to download
# the matching prebuilt binaries.
serde_json = "1.0.39"
# For reading Cargo.toml from within a package.
toml = "1.0.3"

[dev-dependencies]
# build dependencies duplicated for testing :(
cc = { version = "1.1.28" }
bindgen = { version = "0.72.0" }
pkg-config = "0.3.32"
regex = "1.12.3"
heck = "0.5.0"
# ureq = { version = "2.8.0" }
flate2 = { version = "1.0.7" }
tar = { version = "0.4.45" }
serde_json = "1.0.39"
toml = "1.0.3"
