Skip to content

Commit

Permalink
Use workspace dependencies and package inheritance
Browse files Browse the repository at this point in the history
We are also taking this as a chance to synchronize
the versions of all the crates! Because of this, we
will skip the `0.11` version.
  • Loading branch information
hecrj committed Sep 4, 2023
1 parent a56b25b commit f468e25
Show file tree
Hide file tree
Showing 59 changed files with 456 additions and 432 deletions.
135 changes: 99 additions & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
[package]
name = "iced"
version = "0.10.0"
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
edition = "2021"
description = "A cross-platform GUI library inspired by Elm"
license = "MIT"
repository = "https://github.com/iced-rs/iced"
documentation = "https://docs.rs/iced"
readme = "README.md"
keywords = ["gui", "ui", "graphics", "interface", "widgets"]
categories = ["gui"]
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
categories.workspace = true
keywords.workspace = true

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
all-features = true

[badges]
maintenance = { status = "actively-developed" }

[features]
default = ["wgpu"]
# Enable the `wgpu` GPU-accelerated renderer backend
wgpu = ["iced_renderer/wgpu"]
# Enables the `Image` widget
image = ["iced_widget/image", "image_rs"]
image = ["iced_widget/image", "dep:image"]
# Enables the `Svg` widget
svg = ["iced_widget/svg"]
# Enables the `Canvas` widget
Expand Down Expand Up @@ -44,8 +50,28 @@ webgl = ["iced_renderer/webgl"]
# Enables the advanced module
advanced = []

[badges]
maintenance = { status = "actively-developed" }
[dependencies]
iced_core.workspace = true
iced_futures.workspace = true
iced_renderer.workspace = true
iced_widget.workspace = true
iced_winit.features = ["application"]
iced_winit.workspace = true

thiserror.workspace = true

image.workspace = true
image.optional = true

[profile.release-opt]
inherits = "release"
codegen-units = 1
debug = false
lto = true
incremental = false
opt-level = 3
overflow-checks = false
strip = "debuginfo"

[workspace]
members = [
Expand All @@ -62,29 +88,66 @@ members = [
"examples/*",
]

[dependencies]
iced_core = { version = "0.10", path = "core" }
iced_futures = { version = "0.7", path = "futures" }
iced_renderer = { version = "0.1", path = "renderer" }
iced_widget = { version = "0.1", path = "widget" }
iced_winit = { version = "0.10", path = "winit", features = ["application"] }
thiserror = "1"
[workspace.package]
version = "0.12.0"
authors = ["Héctor Ramón Jiménez <hector@hecrj.dev>"]
edition = "2021"
license = "MIT"
repository = "https://github.com/iced-rs/iced"
homepage = "https://iced.rs"
categories = ["gui"]
keywords = ["gui", "ui", "graphics", "interface", "widgets"]

[dependencies.image_rs]
version = "0.24"
package = "image"
optional = true
[workspace.dependencies]
iced = { version = "0.12", path = "." }
iced_core = { version = "0.12", path = "core" }
iced_futures = { version = "0.12", path = "futures" }
iced_graphics = { version = "0.12", path = "graphics" }
iced_renderer = { version = "0.12", path = "renderer" }
iced_runtime = { version = "0.12", path = "runtime" }
iced_style = { version = "0.12", path = "style" }
iced_tiny_skia = { version = "0.12", path = "tiny_skia" }
iced_wgpu = { version = "0.12", path = "wgpu" }
iced_widget = { version = "0.12", path = "widget" }
iced_winit = { version = "0.12", path = "winit" }

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
all-features = true

[profile.release-opt]
inherits = "release"
codegen-units = 1
debug = false
lto = true
incremental = false
opt-level = 3
overflow-checks = false
strip = "debuginfo"
async-std = "1.0"
bitflags = "1.0"
bytemuck = { version = "1.0", features = ["derive"] }
cosmic-text = "0.9"
futures = "0.3"
glam = "0.24"
glyphon = { git = "https://github.com/grovesNL/glyphon.git", rev = "20f0f8fa80e0d0df4c63634ce9176fa489546ca9" }
guillotiere = "0.6"
half = "2.2"
image = "0.24"
instant = "0.1"
kamadak-exif = "0.5"
kurbo = "0.9"
log = "0.4"
lyon = "1.0"
lyon_path = "1.0"
num-traits = "0.2"
once_cell = "1.0"
ouroboros = "0.17"
palette = "0.7"
qrcode = { version = "0.12", default-features = false }
raw-window-handle = "0.5"
resvg = "0.35"
rustc-hash = "1.0"
smol = "1.0"
softbuffer = "0.2"
sysinfo = "0.28"
thiserror = "1.0"
tiny-skia = "0.10"
tokio = "1.0"
tracing = "0.1"
twox-hash = { version = "1.0", default-features = false }
unicode-segmentation = "1.0"
wasm-bindgen-futures = "0.4"
wasm-timer = "0.2"
web-sys = "0.3"
wgpu = "0.17"
winapi = "0.3"
window_clipboard = "0.3"
winit = { git = "https://github.com/iced-rs/winit.git", rev = "c52db2045d0a2f1b8d9923870de1d4ab1994146e", default-features = false }
30 changes: 16 additions & 14 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
[package]
name = "iced_core"
version = "0.10.0"
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
edition = "2021"
description = "The essential concepts of Iced"
license = "MIT"
repository = "https://github.com/iced-rs/iced"
description = "The essential ideas of iced"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
categories.workspace = true
keywords.workspace = true

[dependencies]
bitflags = "1.2"
thiserror = "1"
log = "0.4.17"
twox-hash = { version = "1.5", default-features = false }
bitflags.workspace = true
log.workspace = true
thiserror.workspace = true
twox-hash.workspace = true

[dependencies.palette]
version = "0.7"
optional = true
palette.workspace = true
palette.optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
instant = "0.1"
instant.workspace = true

[dev-dependencies]
approx = "0.5"
3 changes: 2 additions & 1 deletion examples/arc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
iced.workspace = true
iced.features = ["canvas", "tokio", "debug"]
3 changes: 2 additions & 1 deletion examples/bezier_tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["canvas"] }
iced.workspace = true
iced.features = ["canvas"]
2 changes: 1 addition & 1 deletion examples/checkbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../.." }
iced.workspace = true
6 changes: 4 additions & 2 deletions examples/clock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
time = { version = "0.3.5", features = ["local-offset"] }
iced.workspace = true
iced.features = ["canvas", "tokio", "debug"]

time = { version = "0.3", features = ["local-offset"] }
6 changes: 4 additions & 2 deletions examples/color_palette/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["canvas", "palette"] }
palette = "0.7.0"
iced.workspace = true
iced.features = ["canvas", "palette"]

palette.workspace = true
3 changes: 2 additions & 1 deletion examples/combo_box/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["debug"] }
iced.workspace = true
iced.features = ["debug"]
3 changes: 2 additions & 1 deletion examples/component/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["debug", "lazy"] }
iced.workspace = true
iced.features = ["debug", "lazy"]
2 changes: 1 addition & 1 deletion examples/counter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../.." }
iced.workspace = true
3 changes: 2 additions & 1 deletion examples/custom_quad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["advanced"] }
iced.workspace = true
iced.features = ["advanced"]
3 changes: 2 additions & 1 deletion examples/custom_widget/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["advanced"] }
iced.workspace = true
iced.features = ["advanced"]
3 changes: 2 additions & 1 deletion examples/download_progress/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["tokio"] }
iced.workspace = true
iced.features = ["tokio"]

[dependencies.reqwest]
version = "0.11"
Expand Down
3 changes: 2 additions & 1 deletion examples/events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["debug"] }
iced.workspace = true
iced.features = ["debug"]
2 changes: 1 addition & 1 deletion examples/exit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../.." }
iced.workspace = true
10 changes: 6 additions & 4 deletions examples/game_of_life/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
tokio = { version = "1.0", features = ["sync"] }
iced.workspace = true
iced.features = ["debug", "canvas", "tokio"]

itertools = "0.9"
rustc-hash = "1.1"
env_logger = "0.10"
rustc-hash.workspace = true
tokio = { workspace = true, features = ["sync"] }
tracing-subscriber = "0.3"
2 changes: 1 addition & 1 deletion examples/game_of_life/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use iced::{
use std::time::{Duration, Instant};

pub fn main() -> iced::Result {
env_logger::builder().format_timestamp(None).init();
tracing_subscriber::fmt::init();

GameOfLife::run(Settings {
antialiasing: true,
Expand Down
3 changes: 2 additions & 1 deletion examples/geometry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["advanced"] }
iced.workspace = true
iced.features = ["advanced"]
13 changes: 7 additions & 6 deletions examples/integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ edition = "2021"
publish = false

[dependencies]
iced_winit = { path = "../../winit" }
iced_wgpu = { path = "../../wgpu" }
iced_widget = { path = "../../widget" }
iced_renderer = { path = "../../renderer", features = ["wgpu"] }
env_logger = "0.10"
iced_winit.workspace = true
iced_wgpu.workspace = true
iced_widget.workspace = true

tracing-subscriber = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4"
log.workspace = true
wasm-bindgen = "0.2"
web-sys = { version = "0.3", features = ["Element", "HtmlCanvasElement", "Window", "Document"] }

# This dependency a little bit quirky, it is deep in the tree and without `js` feature it
# refuses to work with `wasm32-unknown-unknown target`. Unfortunately, we need this patch
# to make it work
Expand Down
2 changes: 1 addition & 1 deletion examples/integration/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
};

#[cfg(not(target_arch = "wasm32"))]
env_logger::init();
tracing_subscriber::fmt::init();

// Initialize winit
let event_loop = EventLoop::new();
Expand Down
3 changes: 2 additions & 1 deletion examples/lazy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["debug", "lazy"] }
iced.workspace = true
iced.features = ["debug", "lazy"]
8 changes: 5 additions & 3 deletions examples/loading_spinners/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["advanced", "canvas"] }
lyon_algorithms = "1"
once_cell = "1"
iced.workspace = true
iced.features = ["advanced", "canvas"]

lyon_algorithms = "1.0"
once_cell.workspace = true
3 changes: 2 additions & 1 deletion examples/modal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ edition = "2021"
publish = false

[dependencies]
iced = { path = "../..", features = ["advanced"] }
iced.workspace = true
iced.features = ["advanced"]
Loading

0 comments on commit f468e25

Please sign in to comment.