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:
Dennis Kobert
2023-12-04 12:39:55 +01:00
committed by GitHub
parent b7fe38cf31
commit d2450b4d61
34 changed files with 1584 additions and 1209 deletions

View File

@@ -15,24 +15,29 @@ rust-version = "1.66.0"
tauri-build = { version = "1.2", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.2", features = ["api-all", "devtools", "linux-protocol-headers", "wry"] }
axum = "0.6.1"
graphite-editor = { version = "0.0.0", path = "../../editor" }
chrono = "^0.4.23"
tokio = { version = "1", features = ["full"] }
ron = "0.8"
log = "0.4"
fern = { version = "0.6", features = ["colored"] }
futures = "0.3.25"
serde_json = { workspace = true }
serde = { workspace = true }
tauri = { version = "1.5", features = [
"api-all",
"devtools",
"linux-protocol-headers",
"wry",
] }
axum = { workspace = true }
graphite-editor = { path = "../../editor" }
chrono = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
ron = { workspace = true }
log = { workspace = true }
fern = { workspace = true }
futures = { workspace = true }
[features]
gpu = ["graphite-editor/gpu"]
quantization = ["graphite-editor/quantization"]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
default = [ "custom-protocol" ]
default = ["custom-protocol"]
# this feature is used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = ["tauri/custom-protocol"]

View File

@@ -20,27 +20,23 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
editor = { path = "../../editor", package = "graphite-editor" }
document-legacy = { path = "../../document-legacy", package = "graphite-document-legacy" }
graph-craft = { path = "../../node-graph/graph-craft" }
log = "0.4"
graphene-core = { path = "../../node-graph/gcore", features = [
"async",
"std",
"alloc",
] }
serde = { version = "1.0", features = ["derive"] }
document-legacy = { workspace = true }
graph-craft = { workspace = true }
log = { workspace = true }
graphene-core = { workspace = true, features = ["std", "alloc"] }
serde = { workspace = true, features = ["derive"] }
wasm-bindgen = { workspace = true }
serde-wasm-bindgen = "0.5.0"
js-sys = "0.3.63"
wasm-bindgen-futures = "0.4.36"
serde-wasm-bindgen = "0.6"
js-sys = { workspace = true }
wasm-bindgen-futures = { workspace = true }
ron = { version = "0.8", optional = true }
bezier-rs = { path = "../../libraries/bezier-rs" }
bezier-rs = { workspace = true }
# 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
wgpu = { version = "0.17", features = ["fragile-send-sync-non-atomic-wasm"] }
meval = "0.2.0"
[dependencies.web-sys]
version = "0.3.4"
workspace = true
features = [
"Window",
"CanvasRenderingContext2d",
@@ -48,9 +44,6 @@ features = [
"HtmlCanvasElement",
]
[dev-dependencies]
wasm-bindgen-test = "0.3.22"
[package.metadata.wasm-pack.profile.dev]
wasm-opt = false