Skip to content

Commit 717d2cc

Browse files
authored
Port improvements from #127 (#129)
Signed-off-by: Michael X. Grey <[email protected]>
1 parent fccd2c5 commit 717d2cc

File tree

18 files changed

+208
-124
lines changed

18 files changed

+208
-124
lines changed

Cargo.toml

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,42 @@ categories = [
1616
]
1717

1818
[workspace.dependencies]
19-
schemars = { version = "0.9.0" }
20-
serde = { version = "1.0.210", features = ["derive", "rc"] }
21-
serde_json = { version = "1.0.128" }
19+
axum = "0.8.4"
20+
bevy_app = "0.12.1"
21+
bevy_core = "0.12.1"
22+
bevy_derive = "0.12.1"
23+
bevy_ecs = "0.12.1"
24+
bevy_hierarchy = "0.12.1"
25+
bevy_time = "0.12.1"
26+
bevy_utils = "0.12.1"
27+
clap = { version = "4.5.23", features = ["derive"] }
28+
mime_guess = "2.0.5"
29+
schemars = "0.9.0"
30+
serde = "1.0.219"
31+
serde_json = "1.0.140"
32+
tokio = "1.47.1"
33+
tonic = "0.14"
34+
prost = "0.14"
35+
tonic-prost = "0.14"
36+
tonic-prost-build = "0.14"
37+
prost-build = "0.14"
38+
prost-reflect = "0.16"
39+
tracing = "0.1.41"
40+
tracing-subscriber = "0.3.19"
41+
futures = "0.3.31"
42+
futures-util = "0.3.31"
43+
uuid = "1.13.1"
44+
wasm-bindgen = "0.2.100"
45+
zenoh = "1.3.2"
46+
zenoh-ext = "1.4.0"
2247

2348
[dependencies]
2449
bevy_impulse_derive = { path = "macros", version = "0.0.2" }
25-
bevy_ecs = "0.12"
26-
bevy_utils = "0.12"
27-
bevy_hierarchy = "0.12"
28-
bevy_derive = "0.12"
29-
bevy_app = "0.12"
50+
bevy_ecs = { workspace = true }
51+
bevy_utils = { workspace = true }
52+
bevy_hierarchy = { workspace = true }
53+
bevy_derive = { workspace = true }
54+
bevy_app = { workspace = true }
3055

3156
async-task = { version = "4.7.1", optional = true }
3257

@@ -37,8 +62,8 @@ bevy_tasks = { version = "0.12", features = ["multi-threaded"] }
3762

3863
itertools = "0.13"
3964
smallvec = { version = "1.13", features = ["serde"] }
40-
tokio = { version = "1.39", features = ["sync"] }
41-
futures = "0.3"
65+
tokio = { workspace = true, features = ["sync"] }
66+
futures = { workspace = true }
4267
backtrace = "0.3"
4368
anyhow = "1.0"
4469
thiserror = "1.0"
@@ -48,35 +73,35 @@ thiserror = "1.0"
4873
# the testing module for doctests, and doctests can only
4974
# make use of default features, so we're a bit stuck with
5075
# these for now.
51-
bevy_core = "0.12"
52-
bevy_time = "0.12"
76+
bevy_core = { workspace = true }
77+
bevy_time = { workspace = true }
5378

5479
schemars = { workspace = true, optional = true }
55-
serde = { workspace = true, optional = true }
80+
serde = { workspace = true, optional = true, features = ["derive", "rc"] }
5681
serde_json = { workspace = true, optional = true }
5782
cel-interpreter = { version = "0.9.0", features = ["json"], optional = true }
5883

5984
# --- Dependencies for grpc feature
60-
tonic = { version = "0.14", optional = true }
61-
prost = { version = "0.14", optional = true }
62-
tonic-prost = { version = "0.14", optional = true }
63-
prost-reflect = { version = "0.16", features = ["serde"], optional = true }
85+
tonic = { workspace = true, optional = true }
86+
prost = { workspace = true, optional = true }
87+
tonic-prost = { workspace = true, optional = true }
88+
prost-reflect = { workspace = true, features = ["serde"], optional = true }
6489
http = { version = "1.3", optional = true }
6590
futures-lite = { version = "2.6", features = ["std", "race"], optional = true }
6691
async-std = { version = "1.12", optional = true}
6792
# --- end grpc
6893

6994
# --- Dependencies for zenoh feature
70-
zenoh = { version = "1.3.2", features = ["unstable"], optional = true }
71-
zenoh-ext = { version = "*", features = ["unstable"], optional = true }
95+
zenoh = { workspace = true, features = ["unstable"], optional = true }
96+
zenoh-ext = { workspace = true, features = ["unstable"], optional = true }
7297
# --- end zenoh
7398

74-
tracing = "0.1.41"
99+
tracing = { workspace = true }
75100
strum = { version = "0.26.3", optional = true, features = ["derive"] }
76101
semver = { version = "1.0.24", optional = true }
77102

78103
[target.wasm32-unknown-unknown.dependencies]
79-
uuid = { version = "1.13.1", default-features = false, features = ["js"] }
104+
uuid = { workspace = true, default-features = false, features = ["js"] }
80105
getrandom = { version = "0.3.3", features = ["wasm_js"] }
81106

82107
[features]
@@ -143,4 +168,4 @@ required-features = ["diagram"]
143168
doc = false
144169

145170
[build-dependencies]
146-
tonic-prost-build = { version = "0.14", optional = true }
171+
tonic-prost-build = { workspace = true, optional = true }

diagram-editor/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,26 @@ exclude = ["/build.rs"]
2828
path = "server/lib.rs"
2929

3030
[dependencies]
31-
axum = { version = "0.8.4", features = ["json"], default-features = false }
32-
bevy_app = "0.12.1"
33-
bevy_ecs = "0.12.1"
31+
axum = { workspace = true, features = ["json"], default-features = false }
32+
bevy_app = { workspace = true }
33+
bevy_ecs = { workspace = true }
3434
bevy_impulse = { version = "0.0.2", path = "..", features = [
3535
"diagram",
3636
"trace",
3737
] }
38-
clap = { version = "4.5.23", features = ["derive"], optional = true }
38+
clap = { workspace = true, features = ["derive"], optional = true }
3939
flate2 = { version = "1.1.1", optional = true }
40-
futures-util = "0.3.31"
40+
futures-util = { workspace = true }
4141
indexmap = { version = "2.10.0", optional = true, features = ["serde"] }
42-
mime_guess = "2.0.5"
43-
schemars = { version = "0.9", optional = true }
44-
serde = "1.0.219"
45-
serde_json = "1.0.140"
42+
mime_guess = { workspace = true }
43+
schemars = { workspace = true, optional = true }
44+
serde = { workspace = true }
45+
serde_json = { workspace = true }
4646
tar = { version = "0.4.44", optional = true }
4747
thiserror = "2.0.16"
48-
tokio = { version = "1.45.1", features = ["macros"] }
49-
tracing = "0.1.41"
50-
tracing-subscriber = { version = "0.3.19", optional = true }
48+
tokio = { workspace = true, features = ["macros"] }
49+
tracing = { workspace = true }
50+
tracing-subscriber = { workspace = true, optional = true }
5151

5252
[build-dependencies]
5353
flate2 = { version = "1.1.1", optional = true }
@@ -56,7 +56,7 @@ tar = { version = "0.4.44", optional = true }
5656
[dev-dependencies]
5757
futures-channel = "0.3.31"
5858
test-log = "0.2.18"
59-
tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }
59+
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
6060
tower = "0.5.2"
6161

6262
[features]

diagram-editor/wasm/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ categories = [
2525
]
2626

2727
[dependencies]
28-
axum = { version = "0.8.4", features = ["json"], default-features = false }
29-
bevy_app = "0.12.1"
28+
axum = { workspace = true, features = ["json"], default-features = false }
29+
bevy_app = { workspace = true }
3030
bevy_impulse = { version = "0.0.2", path = "../..", features = [
3131
"diagram",
3232
"single_threaded_async",
3333
] }
3434
bevy_impulse_diagram_editor = { version = "0.0.1", path = "..", default-features = false }
35-
mime_guess = { version = "2.0.5" }
36-
serde_json = "1.0.140"
35+
mime_guess = { workspace = true }
36+
serde_json = { workspace = true }
3737
serde-wasm-bindgen = "0.6.5"
38-
wasm-bindgen = "0.2.100"
38+
wasm-bindgen = { workspace = true }
3939
wasm-bindgen-futures = "0.4.50"
40-
tokio = { version = "1.47.1", default-features = false, features = ["rt"] }
41-
futures = "0.3.31"
40+
tokio = { workspace = true, default-features = false, features = ["rt"] }
41+
futures = { workspace = true }
4242
serde.workspace = true
4343

4444
[build-dependencies]

diagram-editor/wasm/src/executor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub async fn post_run(request: PostRunRequestWasm) -> Result<JsValue, JsValue> {
5858
}
5959

6060
#[cfg(test)]
61+
#[cfg(target_arch = "wasm32")]
6162
mod tests {
6263
use std::{collections::HashMap, sync::Arc};
6364

diagram-editor/wasm/src/globals.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ pub fn setup_wasm(
2626
BEVY_APP.lock().unwrap().replace(app);
2727
}
2828

29-
pub(super) fn with_bevy_app<R>(f: impl FnOnce(&mut bevy_app::App) -> R) -> R {
30-
let mut mg = BEVY_APP.lock().unwrap();
31-
let app = mg.as_mut().expect("`init_wasm` not called");
32-
f(app)
33-
}
34-
3529
pub(super) async fn with_bevy_app_async<R>(f: impl AsyncFnOnce(&mut bevy_app::App) -> R) -> R {
3630
let mut mg = BEVY_APP.lock().unwrap();
3731
let app = mg.as_mut().expect("`init_wasm` not called");

diagram-editor/wasm/src/registry.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub fn get_registry() -> JsValue {
1212
.expect("failed to serialize registry")
1313
}
1414

15+
#[cfg(target_arch = "wasm32")]
1516
#[cfg(test)]
1617
mod tests {
1718
use wasm_bindgen_test::wasm_bindgen_test;

diagram-editor/wasm/src/test_utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ init_wasm! {
1717
InitOptions{app, registry, executor_options}
1818
}
1919

20+
#[cfg(target_arch = "wasm32")]
2021
pub(crate) fn setup_test() {
2122
init_wasm();
2223
}

examples/diagram/calculator_ops_catalog/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ edition = "2021"
55
description = "catalog of reusable calculator operations"
66

77
[dependencies]
8-
bevy_app = "0.12"
9-
bevy_core = "0.12"
8+
bevy_app = { workspace = true }
9+
bevy_core = { workspace = true }
1010
bevy_impulse = { version = "0.0.2", path = "../../..", features = ["diagram"] }
11-
bevy_time = "0.12"
11+
bevy_time = { workspace = true }
1212
serde = { workspace = true }
1313
serde_json = { workspace = true }
1414
schemars = { workspace = true }
15-
tracing-subscriber = "0.3.19"
15+
tracing-subscriber = { workspace = true }

examples/diagram/calculator_wasm/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ edition = "2021"
77
crate-type = ["cdylib"]
88

99
[dependencies]
10-
bevy_app = "0.12"
10+
bevy_app = { workspace = true }
1111
bevy_impulse = { version = "0.0.2", path = "../../.." }
1212
bevy_impulse_diagram_editor_wasm = { version = "0.0.1", path = "../../../diagram-editor/wasm" }
1313
calculator_ops_catalog = { version = "0.1.0", path = "../calculator_ops_catalog" }
14-
wasm-bindgen = "0.2.100"
14+
wasm-bindgen = { workspace = true }

examples/zenoh-examples/Cargo.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ name = "use-door"
1212
path = "src/use_door.rs"
1313

1414
[dependencies]
15-
bevy_app = "0.12"
16-
bevy_core = "0.12"
17-
bevy_ecs = "0.12"
18-
bevy_time = "0.12"
1915
bevy_impulse = { version = "0.0.2", path = "../..", features = ["diagram"] }
20-
futures = "0.3"
21-
schemars = { version = "0.9.0" }
22-
serde = { version = "1.0.210", features = ["derive", "rc"] }
23-
serde_json = "1.0.128"
24-
prost = "0.13.5"
25-
tracing = "0.1.41"
26-
clap = { version = "4.5.23", features = ["derive"] }
27-
uuid = { version = "*", features = ["v4"] }
28-
zenoh = { version = "1.3.2", features = ["unstable"] }
29-
zenoh-ext = { version = "*", features = ["unstable"] }
16+
bevy_app = { workspace = true }
17+
bevy_core = { workspace = true }
18+
bevy_ecs = { workspace = true }
19+
bevy_time = { workspace = true }
20+
futures = { workspace = true }
21+
schemars = { workspace = true }
22+
serde = { workspace = true, features = ["derive", "rc"] }
23+
serde_json = { workspace = true }
24+
prost = { workspace = true }
25+
tracing = { workspace = true }
26+
clap = { workspace = true, features = ["derive"] }
27+
uuid = { workspace = true, features = ["v4"] }
28+
zenoh = { workspace = true, features = ["unstable"] }
29+
zenoh-ext = { workspace = true, features = ["unstable"] }
3030

3131
[build-dependencies]
32-
prost-build = "0.13.5"
32+
prost-build = { workspace = true }

0 commit comments

Comments
 (0)