forked from surban/egui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
72 lines (56 loc) · 2.44 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[workspace]
resolver = "2"
members = [
"crates/ecolor",
"crates/egui_demo_app",
"crates/egui_demo_lib",
"crates/egui_extras",
"crates/egui_glow",
"crates/egui_plot",
"crates/egui-wgpu",
"crates/egui-winit",
"crates/egui",
"crates/emath",
"crates/epaint",
"examples/*",
]
[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
rust-version = "1.72"
version = "0.24.1"
[profile.release]
# lto = true # VERY slightly smaller wasm
# opt-level = 's' # 10-20% smaller wasm compared to `opt-level = 3`
# opt-level = 1 # very slow and big wasm. Don't do this.
opt-level = 2 # fast and small wasm, basically same as `opt-level = 's'`
# opt-level = 3 # unnecessarily large wasm for no performance gain
# debug = true # include debug symbols, useful when profiling wasm
panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways).
[profile.dev]
# Can't leave this on by default, because it breaks the Windows build. Related: https://github.com/rust-lang/cargo/issues/4897
# split-debuginfo = "unpacked" # faster debug builds on mac
# opt-level = 1 # Make debug builds run faster
panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways).
[profile.dev.package."*"]
# Optimize all dependencies even in debug builds (does not affect workspace packages):
opt-level = 2
#========================================== patches ================================================
# Glow introduced a breaking change, glow::Context became !Sync.
#
# Glow has reverted the change on main, but hasn't tagged a post-0.13 release yet
# https://github.com/grovesNL/glow/commit/edfd08e2a941f4c3db6a3ba6cf84865f7c5365ff revert
# https://github.com/grovesNL/glow/commit/c4a5f7151b9b4bbb380faa06ec27415235d1bf7e use this one
[patch.crates-io.glow]
version = "0.13"
git = "https://github.com/grovesNL/glow.git"
rev = "c4a5f7151b9b4bbb380faa06ec27415235d1bf7e"
#==================================== dependencies (all targets) ===================================
[workspace.dependencies]
puffin = "0.18"
raw-window-handle = "0.5.0"
thiserror = "1.0.37"
# Make the renderer `Sync` even on wasm32, because it makes the code simpler:
wgpu = { version = "0.18.0", features = ["fragile-send-sync-non-atomic-wasm"] }
# Use this to build wgpu with WebGL support on the Web *instead* of using WebGPU.
#wgpu = { version = "0.18.0", features = ["webgl"] }