Graphite/frontend/wasm/Cargo.toml

76 lines
1.9 KiB
TOML

[package]
name = "graphite-wasm"
publish = false
version = "0.0.0"
rust-version = "1.66.0"
authors = ["Graphite Authors <contact@graphite.rs>"]
edition = "2021"
readme = "../../README.md"
homepage = "https://graphite.rs"
repository = "https://github.com/GraphiteEditor/Graphite"
license = "Apache-2.0"
[features]
tauri = ["ron"]
gpu = ["editor/gpu"]
default = ["gpu"]
[lib]
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"] }
wasm-bindgen = { workspace = true }
serde-wasm-bindgen = "0.5.0"
js-sys = "0.3.63"
wasm-bindgen-futures = "0.4.36"
ron = { version = "0.8", optional = true }
bezier-rs = { path = "../../libraries/bezier-rs" }
# 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"] }
[dependencies.web-sys]
version = "0.3.4"
features = [
"Window",
"CanvasRenderingContext2d",
"Document",
"HtmlCanvasElement",
]
[dev-dependencies]
wasm-bindgen-test = "0.3.22"
[package.metadata.wasm-pack.profile.dev]
wasm-opt = false
[package.metadata.wasm-pack.profile.dev.wasm-bindgen]
debug-js-glue = true
demangle-name-section = true
dwarf-debug-info = true
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Os"]
[package.metadata.wasm-pack.profile.release.wasm-bindgen]
debug-js-glue = false
demangle-name-section = false
dwarf-debug-info = false
[package.metadata.wasm-pack.profile.profiling]
wasm-opt = ["-Os", "-g"]
[package.metadata.wasm-pack.profile.profiling.wasm-bindgen]
debug-js-glue = true
demangle-name-section = true
dwarf-debug-info = true