1[package]
2name = "skia-safe"
3
4description = "Safe Skia Bindings for Rust"
5homepage = "https://github.com/rust-skia/rust-skia"
6repository = "https://github.com/rust-skia/rust-skia"
7documentation = "https://rust-skia.github.io/doc/skia_safe"
8readme = "README.md"
9# 5 max
10keywords = ["skia", "rust-bindings", "vulkan", "opengl", "pdf"]
11# 6 max
12categories = [
13 "api-bindings",
14 "graphics",
15 "multimedia::images",
16 "rendering::graphics-api",
17 "visualization",
18]
19license = "MIT"
20
21version = "0.71.0"
22authors = ["Armin Sander <armin@replicator.org>"]
23edition = "2021"
24
25[lib]
26doctest = false
27
28[features]
29default = ["binary-cache", "embed-icudtl"]
30all-linux = ["gl", "egl", "vulkan", "x11", "wayland", "textlayout", "svg", "webp"]
31all-windows = ["gl", "vulkan", "d3d", "textlayout", "svg", "webp"]
32all-macos = ["gl", "vulkan", "metal", "textlayout", "svg", "webp"]
33gl = ["gpu", "skia-bindings/gl"]
34egl = ["gl", "skia-bindings/egl"]
35x11 = ["gl", "skia-bindings/x11"]
36wayland = ["egl", "skia-bindings/wayland"]
37vulkan = ["gpu", "skia-bindings/vulkan"]
38metal = ["gpu", "skia-bindings/metal"]
39d3d = ["gpu", "windows", "skia-bindings/d3d"]
40textlayout = ["skia-bindings/textlayout"]
41svg = ["skia-bindings/svg", "ureq", "base64"]
42webp = ["webp-encode", "webp-decode"]
43webp-encode = ["skia-bindings/webp-encode"]
44webp-decode = ["skia-bindings/webp-decode"]
45use-system-jpeg-turbo = ["skia-bindings/use-system-jpeg-turbo"]
46binary-cache = ["skia-bindings/binary-cache"]
47embed-icudtl = ["skia-bindings/embed-icudtl"]
48embed-freetype = ["skia-bindings/embed-freetype"]
49
50# implied only, do not use
51gpu = []
52shaper = ["textlayout", "skia-bindings/shaper"]
53
54[dependencies]
55bitflags = "2.0"
56lazy_static = "1.4"
57skia-bindings = { version = "=0.71.0", path = "../skia-bindings", default-features = false }
58
59# D3D types & ComPtr
60windows = { version = "0.52.0", features = [
61 "Win32",
62 "Win32_Graphics",
63 "Win32_Graphics_Dxgi",
64 "Win32_Graphics_Direct3D12",
65 "Win32_Graphics_Direct3D",
66 "Win32_Foundation",
67 "Win32_Graphics_Dxgi_Common",
68], optional = true }
69
70# svg
71ureq = { version = "2.8.0", optional = true }
72base64 = { version = "0.21.0", optional = true }
73
74[dev-dependencies]
75serial_test = "3.0"
76static_assertions = "1.1"
77
78# gl-window
79[target.'cfg(all(not(target_os = "android"), not(target_os = "emscripten"), not(target_os = "ios")))'.dev-dependencies]
80glutin = "0.31.1"
81glutin-winit = { version = "0.4" }
82winit = { version = "0.29.3" }
83raw-window-handle = { version = "0.5.0" }
84gl-rs = { package = "gl", version = "0.14.0" }
85
86# metal-window
87[target.'cfg(target_os = "macos")'.dev-dependencies]
88metal-rs = { package = "metal", version = "0.24.0" }
89winit = "0.29.3"
90raw-window-handle = { version = "0.6.0" }
91objc = "0.2.7"
92cocoa = "0.25.0"
93core-graphics-types = "0.1.1"
94foreign-types-shared = "0.1.1"
95
96# d3d-window
97[target.'cfg(target_os = "windows")'.dev-dependencies]
98anyhow = { version = "1.0.75" }
99windows = { version = "0.52.0", features = [
100 "Win32",
101 "Win32_Graphics",
102 "Win32_Graphics_Dxgi",
103 "Win32_Graphics_Direct3D12",
104 "Win32_Graphics_Direct3D",
105 "Win32_Foundation",
106 "Win32_Graphics_Dxgi_Common",
107] }
108winit = "0.29.4"
109