[package] name = "druid" version = "0.8.3" license = "Apache-2.0" authors = ["Raph Levien "] description = "Data-oriented Rust UI design toolkit." repository = "https://github.com/linebender/druid" categories = ["gui"] readme = "README.md" keywords = ["gui", "ui", "toolkit"] edition = "2021" [package.metadata.docs.rs] features = ["raw-win-handle", "im", "svg", "image"] rustdoc-args = ["--cfg", "docsrs"] default-target = "x86_64-pc-windows-msvc" # rustdoc-scrape-examples tracking issue https://github.com/rust-lang/rust/issues/88791 cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"] [features] default = ["gtk"] gtk = ["druid-shell/gtk"] image = ["druid-shell/image"] svg = ["usvg", "resvg", "tiny-skia"] x11 = ["druid-shell/x11"] # **WARNING** not ready for the prime time. Many things don't work yet. wayland = ["druid-shell/wayland"] serde = ["im/serde", "druid-shell/serde"] # Implement HasRawWindowHandle for WindowHandle raw-win-handle = ["druid-shell/raw-win-handle"] # passing on all the image features. AVIF is not supported because it does not # support decoding, and that's all we use `Image` for. png = ["druid-shell/image_png"] jpeg = ["druid-shell/jpeg"] jpeg_rayon = ["druid-shell/jpeg_rayon"] gif = ["druid-shell/gif"] bmp = ["druid-shell/bmp"] ico = ["druid-shell/ico"] tiff = ["druid-shell/tiff"] webp = ["druid-shell/webp"] pnm = ["druid-shell/pnm"] dds = ["druid-shell/dds"] tga = ["druid-shell/tga"] farbfeld = ["druid-shell/farbfeld"] dxt = ["druid-shell/dxt"] hdr = ["druid-shell/hdr"] # Remember to update this when changing an image feature. image-all = ["image", "svg", "png", "jpeg", "jpeg_rayon", "gif", "bmp", "ico", "tiff", "webp", "pnm", "dds", "tga", "farbfeld", "dxt", "hdr"] [dependencies] druid-shell = { version = "0.8.3", default-features = false, path = "../druid-shell" } druid-derive = { version = "0.5.0", path = "../druid-derive" } tracing = { version = "0.1.37" } tracing-subscriber = { version = "0.3.16", features = ["fmt", "ansi"], default-features = false } fluent-bundle = "0.15.2" fluent-langneg = "0.13.0" fluent-syntax = "0.11.0" unic-langid = "0.9.1" unicode-segmentation = "1.10.1" xi-unicode = "0.3.0" fnv = "1.0.7" instant = { version = "0.1.12", features = ["wasm-bindgen"] } # Optional dependencies chrono = { version = "0.4.23", optional = true } im = { version = "15.1.0", optional = true } resvg = { version = "0.25.0", optional = true } # When updating, make sure it doesn't pin a specific `png` crate, see druid#2345 usvg = { version = "0.25.0", optional = true } tiny-skia = { version = "0.8.3", optional = true } [target.'cfg(target_arch="wasm32")'.dependencies] tracing-wasm = { version = "0.2.1" } console_error_panic_hook = { version = "0.1.7" } [dev-dependencies] float-cmp = { version = "0.9.0", features = ["std"], default-features = false } tempfile = "3.4.0" piet-common = { version = "0.6.2", features = ["png"] } pulldown-cmark = { version = "0.8.0", default-features = false } test-log = { version = "0.2.11", features = ["trace"], default-features = false } # test-env-log needs it tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } [target.'cfg(not(target_arch="wasm32"))'.dev-dependencies] open = "1.7.1" [[example]] name = "hello" # This actually enables scraping for all examples, not just `hello`. # However it is possible to add another [[example]] entry to disable it for a specific example. doc-scrape-examples = true [[example]] name = "cursor" required-features = ["image", "png"] [[example]] name = "image" required-features = ["image", "png"] [[example]] name = "invalidation" required-features = ["im"] [[example]] name = "list" required-features = ["im"] [[example]] name = "svg" required-features = ["svg"] [[example]] name = "tabs" required-features = ["im"] [[example]] name = "widget_gallery" required-features = ["svg", "im", "image", "png"]