1[package]
2name = "femtovg"
3description = "Antialiased 2D vector drawing library"
4version = "0.12.0"
5license = "MIT OR Apache-2.0"
6readme = "README.md"
7authors = [
8 "Peter Todorov <ptodorov@cytec.bg>",
9 "Adam Nemecek <adamnemecek@gmail.com>",
10]
11keywords = ["graphics", "canvas", "vector", "drawing", "gpu"]
12categories = ["graphics"]
13repository = "https://github.com/femtovg/femtovg"
14edition = "2021"
15exclude = ["assets", "examples"]
16
17[profile.release]
18debug = true
19
20[dependencies]
21fnv = "1.0.7"
22rgb = "0.8.50"
23bytemuck = { version = "1.16", features = ["derive"] }
24imgref = "1.11.0"
25bitflags = "2.6.0"
26rustybuzz = "0.20.0"
27unicode-bidi = "0.3.17"
28unicode-segmentation = "1.12.0"
29slotmap = "1.0.7"
30lru = { version = "0.12.5", default-features = false }
31image = { version = "0.25.0", optional = true, default-features = false }
32serde = { version = "1.0", optional = true, features = ["derive", "rc"] }
33glow = { version = "0.16.0", default-features = false }
34log = "0.4"
35wgpu = { version = "23", optional = true, default-features = false, features = ["wgsl"] }
36
37[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
38glutin = { version = "0.31", optional = true, default-features = false }
39
40[target.'cfg(target_arch = "wasm32")'.dependencies]
41web_sys = { version = "0.3", package = "web-sys", features = [
42 "WebGlContextAttributes",
43 "HtmlImageElement",
44 "WebGl2RenderingContext",
45] }
46wasm-bindgen = "0.2"
47
48[features]
49default = ["image-loading"]
50image-loading = ["image"]
51debug_inspector = []
52wgpu = ["dep:wgpu"]
53
54[dev-dependencies]
55winit = { version = "0.29.1" }
56euclid = "0.22.3"
57rand = "0.8"
58svg = "0.14.0"
59usvg = { version = "0.33.0" }
60instant = { version = "0.1", features = ["now"] }
61resource = "0.5.0"
62image = { version = "0.25.0", default-features = false, features = [
63 "jpeg",
64 "png",
65] }
66cosmic-text = "0.12.1"
67swash = "=0.1.17" # keep this in sync with cosmic-text
68lazy_static = "1.4.0"
69spin_on = "0.1"
70wgpu = { version = "23" }
71
72[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
73glutin = "0.31.0"
74glutin-winit = "0.4.0"
75raw-window-handle = "0.5.0"
76
77[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
78web_sys = { version = "0.3", package = "web-sys", features = [
79 "console",
80 "WebGlContextAttributes",
81] }
82console_error_panic_hook = "0.1.5"
83instant = { version = "0.1", features = ["wasm-bindgen", "now"] }
84resource = { version = "0.5.0", features = ["force-static"] }
85getrandom = { version = "0.2.2", features = ["js"] }
86wgpu = { version = "23", features = ["webgl"] }
87wasm-bindgen-futures = { version = "0.4.45" }
88
89[[example]]
90name = "book_example_1_1"
91path = "book/src/1_getting_started/1_setting_up.rs"
92
93[[example]]
94name = "book_example_1_2"
95path = "book/src/1_getting_started/2_rendering.rs"
96
97[[example]]
98name = "book_example_1_3"
99path = "book/src/1_getting_started/3_event_loop.rs"
100
101[package.metadata.docs.rs]
102features = ["glutin/egl"]
103all-features = true
104rustdoc-args = ["--cfg", "docsrs"]
105