mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 23:38:06 +08:00
Refactor Graphite dependency management (#1455)
* Refactor Graphite dependency management * Remove deprecated future executor * Code review nits * Remove unused dependencies * Update dependencies and make compile with all features * Replace use of future_executor with wasm-bindgen-futures --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -12,49 +12,47 @@ license = "Apache-2.0"
|
||||
|
||||
[features]
|
||||
default = ["wasm"]
|
||||
gpu = ["interpreted-executor/gpu", "graphene-std/gpu", "graphene-core/gpu", "wgpu-executor", "gpu-executor"]
|
||||
gpu = [
|
||||
"interpreted-executor/gpu",
|
||||
"graphene-std/gpu",
|
||||
"graphene-core/gpu",
|
||||
"wgpu-executor",
|
||||
"gpu-executor",
|
||||
]
|
||||
quantization = [
|
||||
"graphene-std/quantization",
|
||||
"interpreted-executor/quantization",
|
||||
]
|
||||
wasm = ["wasm-bindgen", "future-executor", "graphene-std/wasm"]
|
||||
wasm = ["wasm-bindgen", "graphene-std/wasm", "wasm-bindgen-futures"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
bitflags = { version = "2.3", features = ["serde"] }
|
||||
thiserror = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1.0" }
|
||||
log = { workspace = true }
|
||||
bitflags = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
graphite-proc-macros = { path = "../proc-macros" }
|
||||
bezier-rs = { path = "../libraries/bezier-rs" }
|
||||
glam = { version = "0.24", features = ["serde", "debug-glam-assert"] }
|
||||
remain = "0.2.2"
|
||||
derivative = "2.2.0"
|
||||
once_cell = "1.13.0" # Remove when `core::cell::LazyCell` is stabilized (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>)
|
||||
bezier-rs = { workspace = true }
|
||||
glam = { workspace = true, features = ["serde", "debug-glam-assert"] }
|
||||
remain = { workspace = true }
|
||||
derivative = { workspace = true }
|
||||
specta.workspace = true
|
||||
|
||||
# Node graph
|
||||
image = { version = "0.24", default-features = false, features = [
|
||||
"bmp",
|
||||
"png",
|
||||
] }
|
||||
image = { workspace = true, features = ["bmp", "png"] }
|
||||
graph-craft = { path = "../node-graph/graph-craft" }
|
||||
wgpu-executor = { path = "../node-graph/wgpu-executor", optional = true }
|
||||
gpu-executor = { path = "../node-graph/gpu-executor", optional = true }
|
||||
interpreted-executor = { path = "../node-graph/interpreted-executor" }
|
||||
dyn-any = { path = "../libraries/dyn-any" }
|
||||
dyn-any = { workspace = true }
|
||||
graphene-core = { path = "../node-graph/gcore" }
|
||||
graphene-std = { path = "../node-graph/gstd" }
|
||||
future-executor = { path = "../node-graph/future-executor", optional = true }
|
||||
num_enum = "0.6.1"
|
||||
|
||||
wasm-bindgen = { workspace = true, optional = true }
|
||||
|
||||
[dependencies.document-legacy]
|
||||
path = "../document-legacy"
|
||||
package = "graphite-document-legacy"
|
||||
wasm-bindgen-futures = { workspace = true, optional = true }
|
||||
document-legacy = { workspace = true }
|
||||
# Remove when `core::cell::LazyCell` is stabilized (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>)
|
||||
once_cell = "1.13.0"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.10"
|
||||
test-case = "3.1"
|
||||
futures = "0.3.28"
|
||||
futures = { workspace = true }
|
||||
|
||||
@@ -293,7 +293,7 @@ impl MessageHandler<PortfolioMessage, (&InputPreprocessorMessageHandler, &Prefer
|
||||
self.persistent_data.imaginate.poll_server_check();
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
if let Some(fut) = self.persistent_data.imaginate.initiate_server_check() {
|
||||
future_executor::spawn(async move {
|
||||
wasm_bindgen_futures::spawn_local(async move {
|
||||
let () = fut.await;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user