mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 21:08:18 +00: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:
parent
97616e8019
commit
f7ada701e5
30 changed files with 1042 additions and 974 deletions
|
@ -6,8 +6,6 @@ description = "Graphene standard library"
|
|||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[features]
|
||||
default = ["wasm", "imaginate"]
|
||||
gpu = [
|
||||
|
@ -27,34 +25,17 @@ resvg = ["dep:resvg"]
|
|||
wayland = []
|
||||
|
||||
[dependencies]
|
||||
fastnoise-lite = { workspace = true }
|
||||
rand = { workspace = true, default-features = false, features = [
|
||||
"alloc",
|
||||
"small_rng",
|
||||
] }
|
||||
rand_chacha = { workspace = true }
|
||||
autoquant = { git = "https://github.com/truedoctor/autoquant", optional = true, features = [
|
||||
"fitting",
|
||||
] }
|
||||
# Local dependencies
|
||||
dyn-any = { path = "../../libraries/dyn-any", features = ["derive"] }
|
||||
graph-craft = { path = "../graph-craft", features = ["serde"] }
|
||||
graphene-core = { path = "../gcore", default-features = false, features = [
|
||||
"std",
|
||||
"serde",
|
||||
"alloc",
|
||||
] }
|
||||
dyn-any = { path = "../../libraries/dyn-any", features = ["derive"] }
|
||||
graph-craft = { path = "../graph-craft", features = ["serde"] }
|
||||
vulkan-executor = { path = "../vulkan-executor", optional = true }
|
||||
wgpu-executor = { path = "../wgpu-executor", optional = true }
|
||||
gpu-executor = { path = "../gpu-executor", optional = true }
|
||||
gpu-compiler-bin-wrapper = { path = "../gpu-compiler/gpu-compiler-bin-wrapper", optional = true }
|
||||
compilation-client = { path = "../compilation-client", optional = true }
|
||||
bytemuck = { workspace = true }
|
||||
image = { workspace = true, default-features = false, features = [
|
||||
"png",
|
||||
"jpeg",
|
||||
] }
|
||||
base64 = { workspace = true, optional = true }
|
||||
wgpu = { workspace = true, optional = true }
|
||||
|
||||
# Workspace dependencies
|
||||
fastnoise-lite = { workspace = true }
|
||||
log = { workspace = true }
|
||||
bezier-rs = { workspace = true, features = ["serde"] }
|
||||
glam = { workspace = true, features = ["serde"] }
|
||||
|
@ -63,17 +44,37 @@ rustc-hash = { workspace = true }
|
|||
serde_json = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
wasm-bindgen = { workspace = true, optional = true }
|
||||
js-sys = { workspace = true, optional = true }
|
||||
wgpu-types = { workspace = true }
|
||||
wasm-bindgen-futures = { workspace = true, optional = true }
|
||||
winit = { workspace = true }
|
||||
url = { workspace = true }
|
||||
usvg = { workspace = true }
|
||||
rand_chacha = { workspace = true }
|
||||
rand = { workspace = true, default-features = false, features = [
|
||||
"alloc",
|
||||
"small_rng",
|
||||
] }
|
||||
bytemuck = { workspace = true }
|
||||
image = { workspace = true, default-features = false, features = [
|
||||
"png",
|
||||
"jpeg",
|
||||
] }
|
||||
|
||||
# Optional local dependencies
|
||||
vulkan-executor = { path = "../vulkan-executor", optional = true }
|
||||
wgpu-executor = { path = "../wgpu-executor", optional = true }
|
||||
gpu-executor = { path = "../gpu-executor", optional = true }
|
||||
gpu-compiler-bin-wrapper = { path = "../gpu-compiler/gpu-compiler-bin-wrapper", optional = true }
|
||||
compilation-client = { path = "../compilation-client", optional = true }
|
||||
|
||||
# Optional workspace dependencies
|
||||
base64 = { workspace = true, optional = true }
|
||||
wgpu = { workspace = true, optional = true }
|
||||
wasm-bindgen = { workspace = true, optional = true }
|
||||
js-sys = { workspace = true, optional = true }
|
||||
wasm-bindgen-futures = { workspace = true, optional = true }
|
||||
tokio = { workspace = true, optional = true, features = ["fs", "io-std"] }
|
||||
image-compare = { version = "0.3.0", optional = true }
|
||||
vello = { workspace = true, optional = true }
|
||||
resvg = { workspace = true, optional = true }
|
||||
usvg = { workspace = true }
|
||||
serde = { workspace = true, optional = true, features = ["derive"] }
|
||||
web-sys = { workspace = true, optional = true, features = [
|
||||
"Window",
|
||||
|
@ -86,3 +87,9 @@ web-sys = { workspace = true, optional = true, features = [
|
|||
"HtmlImageElement",
|
||||
"ImageBitmapRenderingContext",
|
||||
] }
|
||||
autoquant = { git = "https://github.com/truedoctor/autoquant", optional = true, features = [
|
||||
"fitting",
|
||||
] }
|
||||
|
||||
# Optional dependencies
|
||||
image-compare = { version = "0.4.1", optional = true }
|
||||
|
|
|
@ -6,7 +6,7 @@ use glam::{DVec2, U64Vec2};
|
|||
use graph_craft::imaginate_input::{ImaginateController, ImaginateMaskStartingFill, ImaginatePreferences, ImaginateSamplingMethod, ImaginateServerStatus, ImaginateStatus, ImaginateTerminationHandle};
|
||||
use graphene_core::application_io::NodeGraphUpdateMessage;
|
||||
use graphene_core::raster::{Color, Image, Luma, Pixel};
|
||||
use image::{DynamicImage, ImageBuffer, ImageOutputFormat};
|
||||
use image::{DynamicImage, ImageBuffer, ImageFormat};
|
||||
use reqwest::Url;
|
||||
|
||||
const PROGRESS_EVERY_N_STEPS: u32 = 5;
|
||||
|
@ -468,7 +468,7 @@ fn image_to_base64<P: Pixel>(image: Image<P>) -> Result<String, Error> {
|
|||
};
|
||||
|
||||
let mut png_data = std::io::Cursor::new(vec![]);
|
||||
image.write_to(&mut png_data, ImageOutputFormat::Png).map_err(Error::ImageEncode)?;
|
||||
image.write_to(&mut png_data, ImageFormat::Png).map_err(Error::ImageEncode)?;
|
||||
Ok(BASE64_STANDARD.encode(png_data.into_inner()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue