From c56125081a5d33d0d2c5d368be414991e00870df Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Sun, 30 Jul 2023 21:38:22 +0300 Subject: [PATCH 1/2] Clean up `druid-shell` info and add new info to `Cargo.toml`. --- Cargo.toml | 53 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6927f2c8..9d37bd96 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,21 @@ [package] name = "glazier" -version = "0.7.0" -license = "Apache-2.0" -authors = ["Raph Levien "] -description = "Platform abstracting application shell used for druid toolkit." -repository = "https://github.com/linebender/druid" -readme = "README.md" -categories = ["os::macos-apis", "os::windows-apis", "gui"] +version = "0.1.0" edition = "2021" +license = "Apache-2.0" +repository = "https://github.com/linebender/glazier" +description = "Cross-platform native API abstraction for building GUI applications." +keywords = ["gui", "native", "window", "menu", "winit"] +categories = ["gui", "os", "os::windows-apis", "os::macos-apis", "os::linux-apis"] +exclude = ["/.github/"] +publish = false # Until it's ready [package.metadata.docs.rs] +features = ["accesskit", "image"] # Try to keep all features enabled for docs 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 = ["x11"] @@ -27,21 +31,20 @@ wayland = [ # passing on all the image features. AVIF is not supported because it does not # support decoding, and that's all we use `Image` for. -bmp = [] -dds = [] -dxt = [] -farbfeld = [] -gif = [] -jpeg = [] -png = [] -ico = [] -tiff = [] -webp = [] -tga = [] -hdr = [] -image_png = [] -jpeg_rayon = [] -pnm = [] +bmp = ["image/bmp", "image"] +dds = ["image/dds", "image"] +dxt = ["image/dxt", "image"] +farbfeld = ["image/farbfeld", "image"] +gif = ["image/gif", "image"] +hdr = ["image/hdr", "image"] +ico = ["image/ico", "image"] +png = ["image/png", "image"] +jpeg = ["image/jpeg", "image"] +jpeg_rayon = ["image/jpeg_rayon", "image"] +pnm = ["image/pnm", "image"] +tga = ["image/tga", "image"] +tiff = ["image/tiff", "image"] +webp = ["image/webp", "image"] serde = ["kurbo/serde"] accesskit = [ @@ -170,6 +173,12 @@ wgpu = "0.15.0" bindgen = { version = "0.60.1", optional = true } pkg-config = { version = "0.3.25", optional = true } +[[example]] +name = "shello" +# This actually enables scraping for all examples, not just `shello`. +# However it is possible to add another [[example]] entry to disable it for a specific example. +doc-scrape-examples = true + [[example]] name = "accesskit" required-features = ["accesskit"] From e5e2fffbd3ed61085496e2cc601b0eb8c86a0b7a Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Mon, 31 Jul 2023 00:01:29 +0300 Subject: [PATCH 2/2] Remove unused dependencies `image` and `im`. --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 20 +------------------- src/lib.rs | 4 ---- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f36b67d4..92ae2088 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,7 +131,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: cargo test glazier --doc - run: cargo test --doc --no-default-features --features=image,im + run: cargo test --doc --no-default-features --features=accesskit # This tests the future rust compiler to catch errors ahead of time without # breaking CI @@ -176,7 +176,7 @@ jobs: uses: Swatinem/rust-cache@v2 - name: cargo test glazier --doc - run: cargo test --doc --features=image,im + run: cargo test --doc --features=accesskit check-docs: name: Docs diff --git a/Cargo.toml b/Cargo.toml index 9d37bd96..0dc08d87 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ exclude = ["/.github/"] publish = false # Until it's ready [package.metadata.docs.rs] -features = ["accesskit", "image"] # Try to keep all features enabled for docs +features = ["accesskit"] # Try to keep all features enabled for docs rustdoc-args = ["--cfg", "docsrs"] default-target = "x86_64-pc-windows-msvc" # rustdoc-scrape-examples tracking issue https://github.com/rust-lang/rust/issues/88791 @@ -29,22 +29,6 @@ wayland = [ "wayland-backend", ] -# passing on all the image features. AVIF is not supported because it does not -# support decoding, and that's all we use `Image` for. -bmp = ["image/bmp", "image"] -dds = ["image/dds", "image"] -dxt = ["image/dxt", "image"] -farbfeld = ["image/farbfeld", "image"] -gif = ["image/gif", "image"] -hdr = ["image/hdr", "image"] -ico = ["image/ico", "image"] -png = ["image/png", "image"] -jpeg = ["image/jpeg", "image"] -jpeg_rayon = ["image/jpeg_rayon", "image"] -pnm = ["image/pnm", "image"] -tga = ["image/tga", "image"] -tiff = ["image/tiff", "image"] -webp = ["image/webp", "image"] serde = ["kurbo/serde"] accesskit = [ @@ -67,7 +51,6 @@ keyboard-types = { version = "0.6.2", default_features = false } memchr = "2.5" # Optional dependencies -image = { version = "0.24.4", optional = true, default_features = false } raw-window-handle = { version = "0.5.0", default_features = false } accesskit = { version = "0.11.0", optional = true } once_cell = { version = "1", optional = true } @@ -133,7 +116,6 @@ x11rb = { version = "0.11.1", features = [ rand = { version = "0.8.0", optional = true } calloop = { version = "0.7.1", optional = true } log = { version = "0.4.14", optional = true } -im = { version = "15.0.0", optional = true } # Wayland dependencies smithay-client-toolkit = { version = "0.17.0", optional = true } diff --git a/src/lib.rs b/src/lib.rs index e577cbdd..568e2789 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,10 +33,6 @@ html_logo_url = "https://raw.githubusercontent.com/linebender/druid/screenshots/images/doc_logo.png" )] -// Reexport the version of `image` we are using. -#[cfg(feature = "image")] -pub use image; - pub use kurbo; // Reexport the version of `raw_window_handle` we are using.