From 618fc531dd616768ee0f4dd236bdbe37338051e2 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 1 Mar 2024 01:48:48 +0200 Subject: [PATCH 1/7] Prepare package configurations for publishing. --- Cargo.toml | 26 +++++++++++++------------- crates/encoding/Cargo.toml | 2 ++ crates/shaders/Cargo.toml | 4 ++++ crates/tests/Cargo.toml | 6 ++---- examples/headless/Cargo.toml | 16 ++++++---------- examples/run_wasm/Cargo.toml | 8 ++------ examples/scenes/Cargo.toml | 10 +++------- examples/simple/Cargo.toml | 7 +++---- examples/with_bevy/Cargo.toml | 12 ++++-------- examples/with_winit/Cargo.toml | 8 ++------ integrations/vello_svg/Cargo.toml | 7 ++----- 11 files changed, 43 insertions(+), 63 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8214a9824..11fed4c3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,5 @@ [workspace] resolver = "2" - members = [ "crates/encoding", "crates/shaders", @@ -18,22 +17,20 @@ members = [ [workspace.package] edition = "2021" -version = "0.0.1" -license = "MIT OR Apache-2.0" +rust-version = "1.75" +license = "Apache-2.0 OR MIT" repository = "https://github.com/linebender/vello" [package] name = "vello" -description = "An experimental GPU compute-centric 2D renderer" +version = "0.1.0" +description = "An experimental GPU compute-centric 2D renderer." categories = ["rendering", "graphics"] keywords = ["2d", "vector-graphics"] - -# This crate is intended for publishing, but not ready yet -publish = false - -version.workspace = true -license.workspace = true +exclude = ["/.github/", "/doc/", "/examples/", ".gitignore"] edition.workspace = true +rust-version.workspace = true +license.workspace = true repository.workspace = true [features] @@ -42,19 +39,22 @@ hot_reload = [] buffer_labels = [] [dependencies] +vello_encoding = { workspace = true } bytemuck = { workspace = true } skrifa = { workspace = true } peniko = { workspace = true } wgpu = { workspace = true, optional = true } -raw-window-handle = "0.6" -futures-intrusive = "0.5.0" -vello_encoding = { path = "crates/encoding" } +raw-window-handle = { workspace = true } +futures-intrusive = { workspace = true } wgpu-profiler = { workspace = true, optional = true } [workspace.dependencies] +vello_encoding = { version = "0.1.0", path = "crates/encoding" } bytemuck = { version = "1.14.3", features = ["derive"] } skrifa = "0.15.5" peniko = "0.1.0" +futures-intrusive = "0.5.0" +raw-window-handle = "0.6" # NOTE: Make sure to keep this in sync with the version badge in README.md wgpu = { version = "0.19" } diff --git a/crates/encoding/Cargo.toml b/crates/encoding/Cargo.toml index bb2c590ba..24a135a58 100644 --- a/crates/encoding/Cargo.toml +++ b/crates/encoding/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "vello_encoding" version = "0.1.0" +description = "Vello types that represent the data that needs to be rendered." edition.workspace = true +rust-version.workspace = true license.workspace = true repository.workspace = true diff --git a/crates/shaders/Cargo.toml b/crates/shaders/Cargo.toml index 18eb53836..892327410 100644 --- a/crates/shaders/Cargo.toml +++ b/crates/shaders/Cargo.toml @@ -1,10 +1,14 @@ [package] name = "vello_shaders" version = "0.1.0" +description = "Vello infrastructure to compile pipelines and shaders." edition.workspace = true +rust-version.workspace = true license.workspace = true repository.workspace = true +publish = false # Remove this when the package is ready for publishing + [features] default = ["compile", "wgsl", "msl"] compile = ["naga", "thiserror"] diff --git a/crates/tests/Cargo.toml b/crates/tests/Cargo.toml index 7f1dbaa0d..99a7a1352 100644 --- a/crates/tests/Cargo.toml +++ b/crates/tests/Cargo.toml @@ -1,13 +1,11 @@ [package] name = "vello_tests" +description = "Helper code for writing Vello tests." edition.workspace = true -version.workspace = true license.workspace = true repository.workspace = true publish = false -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] vello = { path = "../.." } image = "0.24.9" @@ -16,4 +14,4 @@ anyhow = { workspace = true } wgpu = { workspace = true } pollster = { workspace = true } png = "0.17.13" -futures-intrusive = "0.5.0" +futures-intrusive = { workspace = true } diff --git a/examples/headless/Cargo.toml b/examples/headless/Cargo.toml index caf86f66c..52f5365f7 100644 --- a/examples/headless/Cargo.toml +++ b/examples/headless/Cargo.toml @@ -1,23 +1,19 @@ [package] name = "headless" -description = "An example showing how to use `vello` to create raster images" -publish = false - -version.workspace = true -license.workspace = true +description = "An example showing how to use `vello` to create raster images." edition.workspace = true +license.workspace = true repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +publish = false [dependencies] -anyhow = { workspace = true } -clap = { workspace = true, features = ["derive"] } vello = { path = "../../" } scenes = { path = "../scenes" } +anyhow = { workspace = true } +clap = { workspace = true, features = ["derive"] } wgpu = { workspace = true } pollster = { workspace = true } env_logger = "0.11.2" png = "0.17.13" -futures-intrusive = "0.5.0" +futures-intrusive = { workspace = true } diff --git a/examples/run_wasm/Cargo.toml b/examples/run_wasm/Cargo.toml index de51958a6..76068dd0c 100644 --- a/examples/run_wasm/Cargo.toml +++ b/examples/run_wasm/Cargo.toml @@ -1,13 +1,9 @@ [package] name = "run_wasm" -publish = false - -version.workspace = true -license.workspace = true edition.workspace = true +license.workspace = true repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +publish = false [dependencies] cargo-run-wasm = "0.3.2" diff --git a/examples/scenes/Cargo.toml b/examples/scenes/Cargo.toml index cf3823263..dd23a7d4c 100644 --- a/examples/scenes/Cargo.toml +++ b/examples/scenes/Cargo.toml @@ -1,14 +1,10 @@ [package] name = "scenes" -description = "Vello scenes used in the other examples" -publish = false - -version.workspace = true -license.workspace = true +description = "Vello scenes used in the other examples." edition.workspace = true +license.workspace = true repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +publish = false [dependencies] vello = { path = "../../" } diff --git a/examples/simple/Cargo.toml b/examples/simple/Cargo.toml index 417ef71b7..aaca1effa 100644 --- a/examples/simple/Cargo.toml +++ b/examples/simple/Cargo.toml @@ -1,17 +1,16 @@ [package] name = "simple" edition.workspace = true -version.workspace = true license.workspace = true repository.workspace = true publish = false # The dependencies here are independent from the workspace versions [dependencies] +vello = { path = "../../" } +# When using, replace the above line with this: +#vello = { git = "https://github.com/linebender/vello" } anyhow = "1.0.80" pollster = "0.3.0" wgpu = "0.19.1" winit = "0.29.11" -vello = { path = "../../" } -# When using, replace the above line with this: -#vello = { git = "https://github.com/linebender/vello" } diff --git a/examples/with_bevy/Cargo.toml b/examples/with_bevy/Cargo.toml index d4cdbea6c..7c8b01bb2 100644 --- a/examples/with_bevy/Cargo.toml +++ b/examples/with_bevy/Cargo.toml @@ -1,15 +1,13 @@ [package] name = "with_bevy" -description = "Example of using Vello in a Bevy application" - -version.workspace = true -license.workspace = true +description = "Example of using Vello in a Bevy application." edition.workspace = true +license.workspace = true repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +publish = false [dependencies] +vello = { path = "../../" } bevy = { version = "0.13", features = [ "bevy_winit", "bevy_core_pipeline", @@ -19,5 +17,3 @@ bevy = { version = "0.13", features = [ "x11", "tonemapping_luts", ], default-features = false } - -vello = { path = "../../" } diff --git a/examples/with_winit/Cargo.toml b/examples/with_winit/Cargo.toml index 7bdd09259..cc519d38e 100644 --- a/examples/with_winit/Cargo.toml +++ b/examples/with_winit/Cargo.toml @@ -1,14 +1,10 @@ [package] name = "with_winit" description = "An example using vello to render to a winit window" -publish = false - -version.workspace = true -license.workspace = true edition.workspace = true +license.workspace = true repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +publish = false [lib] name = "with_winit" diff --git a/integrations/vello_svg/Cargo.toml b/integrations/vello_svg/Cargo.toml index 89ec0dc1a..fcb421e90 100644 --- a/integrations/vello_svg/Cargo.toml +++ b/integrations/vello_svg/Cargo.toml @@ -3,13 +3,10 @@ name = "vello_svg" description = "Render a usvg document to a Vello scene" categories = ["rendering", "graphics"] keywords = ["2d", "vector-graphics", "vello"] - -version.workspace = true -license.workspace = true edition.workspace = true +license.workspace = true repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +publish = false [dependencies] vello = { path = "../../" } From 88b8ac19afc5dd1f0c861411e7b41ba94fb5847c Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 1 Mar 2024 02:07:13 +0200 Subject: [PATCH 2/7] Add a version field to `with_winit` to appease cargo-apk. --- examples/with_winit/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/with_winit/Cargo.toml b/examples/with_winit/Cargo.toml index cc519d38e..2b2c12a7f 100644 --- a/examples/with_winit/Cargo.toml +++ b/examples/with_winit/Cargo.toml @@ -1,5 +1,6 @@ [package] name = "with_winit" +version = "0.0.0" description = "An example using vello to render to a winit window" edition.workspace = true license.workspace = true From df2133b78d48d91de4fcc9e055a95e920f0b29f7 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 1 Mar 2024 12:34:05 +0200 Subject: [PATCH 3/7] Remove backticks from package description. --- examples/headless/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/headless/Cargo.toml b/examples/headless/Cargo.toml index 52f5365f7..6c04262a1 100644 --- a/examples/headless/Cargo.toml +++ b/examples/headless/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "headless" -description = "An example showing how to use `vello` to create raster images." +description = "An example showing how to use Vello to create raster images." edition.workspace = true license.workspace = true repository.workspace = true From 6c9c073c7ccc2f732fe35c6d7ed9bb98bc0a0133 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 1 Mar 2024 12:54:58 +0200 Subject: [PATCH 4/7] Change the tests package description. --- crates/tests/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tests/Cargo.toml b/crates/tests/Cargo.toml index 99a7a1352..8a6ce575e 100644 --- a/crates/tests/Cargo.toml +++ b/crates/tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vello_tests" -description = "Helper code for writing Vello tests." +description = "Integration tests for Vello." edition.workspace = true license.workspace = true repository.workspace = true From 12a6c85596d7f8c2570a79010e2c5b1ab67b07d5 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 1 Mar 2024 13:43:12 +0200 Subject: [PATCH 5/7] Add workspace version for unified version numbering. --- Cargo.toml | 9 ++++++++- crates/encoding/Cargo.toml | 2 +- crates/shaders/Cargo.toml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 11fed4c3c..bcc950b43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,13 @@ members = [ ] [workspace.package] +# Vello version, also used by other packages which want to mimic Vello's version. +# Right now those packages include vello_encoding and vello_shaders. +# +# NOTE: When bumping this, remember to also bump the aforementioned other package's +# version in the dependencies section at the bottom of this file. +version = "0.1.0" + edition = "2021" rust-version = "1.75" license = "Apache-2.0 OR MIT" @@ -23,7 +30,7 @@ repository = "https://github.com/linebender/vello" [package] name = "vello" -version = "0.1.0" +version.workspace = true description = "An experimental GPU compute-centric 2D renderer." categories = ["rendering", "graphics"] keywords = ["2d", "vector-graphics"] diff --git a/crates/encoding/Cargo.toml b/crates/encoding/Cargo.toml index 24a135a58..763e5fba0 100644 --- a/crates/encoding/Cargo.toml +++ b/crates/encoding/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vello_encoding" -version = "0.1.0" +version.workspace = true # We mimic Vello's version description = "Vello types that represent the data that needs to be rendered." edition.workspace = true rust-version.workspace = true diff --git a/crates/shaders/Cargo.toml b/crates/shaders/Cargo.toml index 892327410..aef9c4abf 100644 --- a/crates/shaders/Cargo.toml +++ b/crates/shaders/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vello_shaders" -version = "0.1.0" +version.workspace = true # We mimic Vello's version description = "Vello infrastructure to compile pipelines and shaders." edition.workspace = true rust-version.workspace = true From 3b1eb9cd528a4e6929a7bd940a5c9aee20ea0ce0 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 1 Mar 2024 13:46:43 +0200 Subject: [PATCH 6/7] Fix typo. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index bcc950b43..9d3c850e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ members = [ # Vello version, also used by other packages which want to mimic Vello's version. # Right now those packages include vello_encoding and vello_shaders. # -# NOTE: When bumping this, remember to also bump the aforementioned other package's +# NOTE: When bumping this, remember to also bump the aforementioned other packages' # version in the dependencies section at the bottom of this file. version = "0.1.0" From 90f2d4f6cb542a1fb1b8516eeb403a60c475dcb5 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Fri, 1 Mar 2024 14:18:56 +0200 Subject: [PATCH 7/7] Tweak some comments. --- Cargo.toml | 1 + crates/shaders/Cargo.toml | 2 +- examples/simple/Cargo.toml | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9d3c850e2..8977a09d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ members = [ # # NOTE: When bumping this, remember to also bump the aforementioned other packages' # version in the dependencies section at the bottom of this file. +# Additionally, bump the Vello dependency version in the 'simple' example. version = "0.1.0" edition = "2021" diff --git a/crates/shaders/Cargo.toml b/crates/shaders/Cargo.toml index aef9c4abf..9114fef3a 100644 --- a/crates/shaders/Cargo.toml +++ b/crates/shaders/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vello_shaders" version.workspace = true # We mimic Vello's version -description = "Vello infrastructure to compile pipelines and shaders." +description = "Vello infrastructure to preprocess and cross-compile shaders at compile time." edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/examples/simple/Cargo.toml b/examples/simple/Cargo.toml index aaca1effa..639818ef5 100644 --- a/examples/simple/Cargo.toml +++ b/examples/simple/Cargo.toml @@ -7,9 +7,9 @@ publish = false # The dependencies here are independent from the workspace versions [dependencies] -vello = { path = "../../" } -# When using, replace the above line with this: -#vello = { git = "https://github.com/linebender/vello" } +# When using this example outside of the original Vello workspace, +# remove the path property of the following Vello dependency requirement. +vello = { version = "0.1.0", path = "../../" } anyhow = "1.0.80" pollster = "0.3.0" wgpu = "0.19.1"