Skip to content

Commit da125b8

Browse files
committed
workspace: unify dependency features in workspace dep
1 parent ce5350c commit da125b8

File tree

13 files changed

+64
-71
lines changed

13 files changed

+64
-71
lines changed

Cargo.toml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ resolver = "2"
3131

3232
[workspace.dependencies]
3333
# Local dependencies
34-
bezier-rs = { path = "libraries/bezier-rs", features = ["dyn-any"] }
35-
dyn-any = { path = "libraries/dyn-any", features = ["derive", "glam", "reqwest"] }
34+
bezier-rs = { path = "libraries/bezier-rs", features = ["dyn-any", "serde"] }
35+
dyn-any = { path = "libraries/dyn-any", features = ["derive", "glam", "reqwest", "log-bad-types", "rc"] }
3636
math-parser = { path = "libraries/math-parser" }
37-
rawkit = { path = "libraries/rawkit" }
3837
path-bool = { path = "libraries/path-bool" }
3938
graphene-core = { path = "node-graph/gcore", default-features = false }
4039
graph-craft = { path = "node-graph/graph-craft", features = ["serde"] }
@@ -60,27 +59,49 @@ convert_case = "0.7"
6059
derivative = "2.2"
6160
thiserror = "2"
6261
anyhow = "1.0"
63-
proc-macro2 = "1"
62+
proc-macro2 = { version = "1", features = [ "span-locations" ] }
6463
quote = "1.0"
6564
axum = "0.8"
6665
chrono = "0.4"
6766
ron = "0.8"
6867
fastnoise-lite = "1.1"
69-
wgpu = "23"
68+
wgpu = { version = "23", features = [
69+
# We don't have wgpu on multiple threads (yet) https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md#wgpu-types-now-send-sync-on-wasm
70+
"fragile-send-sync-non-atomic-wasm",
71+
"spirv",
72+
"strict_asserts",
73+
] }
7074
once_cell = "1.13" # Remove when `core::cell::LazyCell` (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>) is stabilized in Rust 1.80 and we bump our MSRV
7175
wasm-bindgen = "=0.2.100" # NOTICE: ensure this stays in sync with the `wasm-bindgen-cli` version in `website/content/volunteer/guide/project-setup/_index.md`. We pin this version because wasm-bindgen upgrades may break various things.
7276
wasm-bindgen-futures = "0.4"
7377
js-sys = "=0.3.77"
74-
web-sys = "=0.3.77"
78+
web-sys = { version = "=0.3.77", features = [
79+
"Document",
80+
"DomRect",
81+
"Element",
82+
"HtmlCanvasElement",
83+
"CanvasRenderingContext2d",
84+
"CanvasPattern",
85+
"OffscreenCanvas",
86+
"OffscreenCanvasRenderingContext2d",
87+
"TextMetrics",
88+
"Window",
89+
"IdleRequestOptions",
90+
"ImageData",
91+
"Navigator",
92+
"Gpu",
93+
"HtmlImageElement",
94+
"ImageBitmapRenderingContext",
95+
] }
7596
winit = "0.29"
7697
url = "2.5"
77-
tokio = { version = "1.29", features = ["fs", "io-std"] }
98+
tokio = { version = "1.29", features = ["fs", "macros", "io-std", "rt"] }
7899
vello = { git = "https://github.com/linebender/vello.git", rev = "3275ec8" } # TODO switch back to stable when a release is made
79100
resvg = "0.44"
80101
usvg = "0.44"
81-
rand = { version = "0.9", default-features = false }
102+
rand = { version = "0.9", default-features = false, features = ["std_rng"] }
82103
rand_chacha = "0.9"
83-
glam = { version = "0.29", default-features = false, features = ["serde", "scalar-math"] }
104+
glam = { version = "0.29", default-features = false, features = ["serde", "scalar-math", "debug-glam-assert"] }
84105
base64 = "0.22"
85106
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp"] }
86107
rustybuzz = "0.20"
@@ -97,6 +118,13 @@ specta = { version = "2.0.0-rc.22", features = [
97118
syn = { version = "2.0", default-features = false, features = [
98119
"full",
99120
"derive",
121+
"parsing",
122+
"printing",
123+
"visit-mut",
124+
"visit",
125+
"clone-impls",
126+
"extra-traits",
127+
"proc-macro",
100128
] }
101129
kurbo = { version = "0.11.0", features = ["serde"] }
102130
petgraph = { version = "0.7.1", default-features = false, features = [

editor/Cargo.toml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,14 @@ serde = { workspace = true }
4141
serde_json = { workspace = true }
4242
bezier-rs = { workspace = true }
4343
futures = { workspace = true }
44-
glam = { workspace = true, features = ["serde", "debug-glam-assert"] }
44+
glam = { workspace = true }
4545
derivative = { workspace = true }
4646
specta = { workspace = true }
4747
dyn-any = { workspace = true }
4848
num_enum = { workspace = true }
4949
usvg = { workspace = true }
5050
once_cell = { workspace = true }
51-
web-sys = { workspace = true, features = [
52-
"Document",
53-
"DomRect",
54-
"Element",
55-
"HtmlCanvasElement",
56-
"CanvasRenderingContext2d",
57-
"CanvasPattern",
58-
"OffscreenCanvas",
59-
"OffscreenCanvasRenderingContext2d",
60-
"TextMetrics",
61-
] }
51+
web-sys = { workspace = true }
6252

6353
# Required dependencies
6454
spin = "0.9.8"
@@ -75,7 +65,7 @@ ron = { workspace = true, optional = true }
7565
# Workspace dependencies
7666
env_logger = { workspace = true }
7767
futures = { workspace = true }
78-
tokio = { workspace = true, features = ["rt", "macros"] }
68+
tokio = { workspace = true }
7969

8070
[lints.rust]
8171
# TODO: figure out why we check these features when they do not exist

frontend/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ graphite-editor = { path = "../../editor", features = [
2929
# Workspace dependencies
3030
axum = { workspace = true }
3131
chrono = { workspace = true }
32-
tokio = { workspace = true, features = ["macros", "rt"] }
32+
tokio = { workspace = true }
3333
ron = { workspace = true }
3434
log = { workspace = true }
3535
fern = { workspace = true }

frontend/wasm/Cargo.toml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,15 @@ editor = { path = "../../editor", package = "graphite-editor", features = [
3030
graph-craft = { workspace = true }
3131
log = { workspace = true }
3232
graphene-core = { workspace = true, features = ["wasm"] }
33-
serde = { workspace = true, features = ["derive"] }
33+
serde = { workspace = true }
3434
wasm-bindgen = { workspace = true }
3535
serde-wasm-bindgen = { workspace = true }
3636
js-sys = { workspace = true }
3737
wasm-bindgen-futures = { workspace = true }
3838
glam = { workspace = true }
3939
math-parser = { workspace = true }
40-
wgpu = { workspace = true, features = [
41-
"fragile-send-sync-non-atomic-wasm",
42-
] } # We don't have wgpu on multiple threads (yet) https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md#wgpu-types-now-send-sync-on-wasm
43-
web-sys = { workspace = true, features = [
44-
"Window",
45-
"CanvasRenderingContext2d",
46-
"Document",
47-
"HtmlCanvasElement",
48-
"IdleRequestOptions",
49-
] }
40+
wgpu = { workspace = true }
41+
web-sys = { workspace = true }
5042

5143
[package.metadata.wasm-pack.profile.dev]
5244
wasm-opt = false

libraries/bezier-rs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ documentation = "https://graphite.rs/libraries/bezier-rs/"
1515

1616
[dependencies]
1717
# Required dependencies
18-
glam = { workspace = true, features = ["serde"] }
18+
glam = { workspace = true }
1919

2020
# Optional local dependencies
2121
dyn-any = { version = "0.3.0", path = "../dyn-any", optional = true }

libraries/dyn-any/derive/Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ proc-macro = true
1717
# Workspace dependencies
1818
proc-macro2 = { workspace = true }
1919
quote = { workspace = true }
20-
syn = { workspace = true, default-features = false, features = [
21-
"derive",
22-
"parsing",
23-
"proc-macro",
24-
"printing",
25-
"clone-impls",
26-
] }
20+
syn = { workspace = true }
2721

2822
[dev-dependencies]
2923
# Local dependencies

node-graph/gcore/Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ node-macro = { workspace = true }
3333
num-derive = { workspace = true }
3434
num-traits = { workspace = true }
3535
usvg = { workspace = true }
36-
rand = { workspace = true, default-features = false, features = ["std_rng"] }
36+
rand = { workspace = true }
3737
glam = { workspace = true }
3838
serde_json = { workspace = true }
3939
petgraph = { workspace = true }
@@ -51,17 +51,15 @@ kurbo = { workspace = true }
5151
log = { workspace = true }
5252

5353
# Optional workspace dependencies
54-
serde = { workspace = true, optional = true, features = ["derive"] }
54+
serde = { workspace = true, optional = true }
5555
base64 = { workspace = true, optional = true }
5656
vello = { workspace = true, optional = true }
5757
wgpu = { workspace = true, optional = true }
58-
web-sys = { workspace = true, optional = true, features = [
59-
"HtmlCanvasElement",
60-
] }
58+
web-sys = { workspace = true, optional = true }
6159

6260
[dev-dependencies]
6361
# Workspace dependencies
64-
tokio = { workspace = true, features = ["rt", "macros"] }
62+
tokio = { workspace = true }
6563
serde_json = { workspace = true }
6664

6765
[lints.rust]

node-graph/graph-craft/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ loading = ["serde_json", "serde"]
1515

1616
[dependencies]
1717
# Local dependencies
18-
dyn-any = { workspace = true, features = [
19-
"log-bad-types",
20-
"rc",
21-
] }
18+
dyn-any = { workspace = true }
2219
graphene-core = { workspace = true }
2320

2421
# Workspace dependencies

node-graph/graphene-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ futures = { workspace = true }
3131
fern = { workspace = true }
3232
chrono = { workspace = true }
3333
wgpu = { workspace = true }
34-
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
34+
tokio = { workspace = true, features = ["rt-multi-thread"] }
3535

3636
# Required dependencies
3737
clap = { version = "4.5.31", features = ["cargo", "derive"] }

node-graph/gstd/Cargo.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,30 @@ wayland = ["graph-craft/wayland"]
2222
dyn-any = { workspace = true }
2323
graph-craft = { workspace = true, features = ["serde"] }
2424
wgpu-executor = { workspace = true }
25-
graphene-core = { workspace = true, default-features = false, features = ["serde"] }
25+
graphene-core = { workspace = true, features = ["serde"] }
2626

2727
# Workspace dependencies
2828
fastnoise-lite = { workspace = true }
2929
log = { workspace = true }
30-
bezier-rs = { workspace = true, features = ["serde"] }
30+
bezier-rs = { workspace = true }
3131
path-bool = { workspace = true }
3232
glam = { workspace = true }
3333
node-macro = { workspace = true }
3434
reqwest = { workspace = true }
3535
futures = { workspace = true }
3636
usvg = { workspace = true }
3737
rand_chacha = { workspace = true }
38-
rand = { workspace = true, default-features = false, features = [
39-
"alloc",
40-
"small_rng",
41-
] }
38+
rand = { workspace = true }
4239
bytemuck = { workspace = true }
4340
image = { workspace = true }
4441

4542
# Optional workspace dependencies
4643
base64 = { workspace = true, optional = true }
4744
wasm-bindgen = { workspace = true, optional = true }
4845
wasm-bindgen-futures = { workspace = true, optional = true }
49-
tokio = { workspace = true, optional = true, features = ["fs", "io-std"] }
46+
tokio = { workspace = true, optional = true }
5047
vello = { workspace = true, optional = true }
51-
serde = { workspace = true, optional = true, features = ["derive"] }
48+
serde = { workspace = true, optional = true }
5249
web-sys = { workspace = true, optional = true, features = [
5350
"Window",
5451
"CanvasRenderingContext2d",
@@ -65,4 +62,4 @@ web-sys = { workspace = true, optional = true, features = [
6562
ndarray = "0.16.1"
6663

6764
[dev-dependencies]
68-
tokio = { workspace = true, features = ["macros"] }
65+
tokio = { workspace = true }

0 commit comments

Comments
 (0)