-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
57 lines (50 loc) · 1.97 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[package]
name = "protos-rs"
version = "0.1.0"
authors = ["Antoine Altorffer <[email protected]>"]
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
image = "0.24"
anyhow = "1.0"
serde = { version = "1.0", optional = true }
chrono = "0.4"
pollster = "0.2"
bytemuck = { version = "1.4", features = [ "derive" ] }
wgpu ="0.18"
egui = "0.25"
egui-wgpu = "0.25"
egui-winit = {version="0.25", default-features = false} # arboard dependency fail build on wasm...
egui_extras = { version="0.25", features = ["syntect"]}
egui_node_graph="0.4.0" # Max version supported of egui is 0.19.0
winit = { version="0.29.4", features = ["x11"]}
backtrace = "0.3.69"
serde_json = "1.0.111"
syntect = {version= "5.1.0", default-features = false} # Might remove some dependencies
log = "0.4.21"
[patch.crates-io]
egui_node_graph = { git = "https://github.com/antaalt/egui_node_graph.git", branch = "upgrade-egui" }
[features]
default = ["persistence"]
persistence = ["serde", "egui_node_graph/persistence", "egui/persistence", "wgpu/trace", "wgpu/replay"]
# How to build for wasm:
# Set "rust-analyzer.cargo.target": "wasm32-unknown-unknown" in Rust analyzer settings for linting
# In config.toml (Not this file), setup RUSTFLAGS for wgpu compilation
# [build]
# rustflags = ["--cfg=web_sys_unstable_apis"]
# rustdocflags = ["--cfg=web_sys_unstable_apis"]
# run 'cargo build --lib --target wasm32-unknown-unknown --no-default-features'
# then 'wasm-bindgen target/wasm32-unknown-unknown/debug/protos_rs.wasm --out-dir web/public/scripts --out-name protos_rs --no-modules --no-typescript'
# then run our basic node server.
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.92"
wasm-bindgen-futures = "0.4.42"
wasm-bindgen-test = "0.3.42"
web-sys = "0.3.5"
console_log = "1.0.0"
js-sys = "0.3.68"
console_error_panic_hook = "0.1.7"
[lib]
crate-type = ["cdylib", "rlib"]
[profile.release]
opt-level = 2 # fast and small wasm