mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 14:38:13 +08:00
Reorganize cargo dependencies and upgrade most of them (#1815)
* Reorganize cargo dependencies and upgrade most * cargo update * Attempt 2 * Polishing changes * Comment out specta typescript flag-dependent code * Fix test
This commit is contained in:
@@ -7,24 +7,26 @@ license = "Apache-2.0"
|
||||
repository = ""
|
||||
default-run = "graphite-desktop"
|
||||
edition = "2021"
|
||||
rust-version = "1.66.0"
|
||||
rust-version = "1.70.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.2", features = [] }
|
||||
[features]
|
||||
# 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"]
|
||||
# this feature is used for production builds where `devPath` points to the filesystem
|
||||
# DO NOT remove this
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
||||
gpu = ["graphite-editor/gpu"]
|
||||
quantization = ["graphite-editor/quantization"]
|
||||
|
||||
[dependencies]
|
||||
# Local dependencies
|
||||
graphite-editor = { path = "../../editor" }
|
||||
|
||||
# Workspace dependencies
|
||||
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 }
|
||||
@@ -32,12 +34,14 @@ 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"]
|
||||
# this feature is used for production builds where `devPath` points to the filesystem
|
||||
# DO NOT remove this
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
||||
# Required dependencies
|
||||
tauri = { version = "1.5", features = [
|
||||
"api-all",
|
||||
"devtools",
|
||||
"linux-protocol-headers",
|
||||
"wry",
|
||||
] }
|
||||
|
||||
[build-dependencies]
|
||||
# Required dependencies
|
||||
tauri-build = { version = "1.2", features = [] }
|
||||
|
||||
@@ -61,7 +61,8 @@ async fn main() {
|
||||
|
||||
// run it with hyper on localhost:3000
|
||||
tauri::async_runtime::spawn(async {
|
||||
axum::Server::bind(&"0.0.0.0:3001".parse().unwrap()).serve(app.into_make_service()).await.unwrap();
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
});
|
||||
|
||||
tauri::Builder::default()
|
||||
|
||||
+17
-14
@@ -2,7 +2,7 @@
|
||||
name = "graphite-wasm"
|
||||
publish = false
|
||||
version = "0.0.0"
|
||||
rust-version = "1.66.0"
|
||||
rust-version = "1.70.0"
|
||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||
edition = "2021"
|
||||
readme = "../../README.md"
|
||||
@@ -11,39 +11,42 @@ repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[features]
|
||||
tauri = ["ron"]
|
||||
gpu = ["editor/gpu"]
|
||||
default = ["gpu"]
|
||||
gpu = ["editor/gpu"]
|
||||
tauri = ["ron"]
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
# Local dependencies
|
||||
editor = { path = "../../editor", package = "graphite-editor" }
|
||||
|
||||
# Workspace dependencies
|
||||
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.6"
|
||||
serde-wasm-bindgen = { workspace = true }
|
||||
js-sys = { workspace = true }
|
||||
wasm-bindgen-futures = { workspace = true }
|
||||
ron = { workspace = true, optional = true }
|
||||
bezier-rs = { workspace = true }
|
||||
glam = { 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 = { workspace = true, features = ["fragile-send-sync-non-atomic-wasm"] }
|
||||
meval = "0.2.0"
|
||||
|
||||
[dependencies.web-sys]
|
||||
workspace = true
|
||||
features = [
|
||||
meval = { workspace = true }
|
||||
wgpu = { workspace = true, features = [
|
||||
"fragile-send-sync-non-atomic-wasm",
|
||||
] } # 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
|
||||
web-sys = { workspace = true, features = [
|
||||
"Window",
|
||||
"CanvasRenderingContext2d",
|
||||
"Document",
|
||||
"HtmlCanvasElement",
|
||||
"IdleRequestOptions"
|
||||
]
|
||||
"IdleRequestOptions",
|
||||
] }
|
||||
|
||||
# Optional workspace dependencies
|
||||
ron = { workspace = true, optional = true }
|
||||
|
||||
[package.metadata.wasm-pack.profile.dev]
|
||||
wasm-opt = false
|
||||
|
||||
Reference in New Issue
Block a user