-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
122 lines (109 loc) · 3.92 KB
/
Copy pathCargo.toml
File metadata and controls
122 lines (109 loc) · 3.92 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[package]
name = "kilowatt_tycoon"
version = "0.1.0"
edition = "2024"
description = "A 2D top-down simulation/tycoon game where the player operates an EV Charging Point Operator (CPO)"
license = "MIT"
[features]
default = ["ocpp", "openadr", "ocpi"]
# Use dynamic linking for faster native compilation (not supported for WASM)
native = ["bevy/dynamic_linking"]
# OCPP 1.6J WebSocket streaming (disabled by default)
ocpp = ["dep:rust-ocpp", "dep:tokio-tungstenite", "dep:futures-util"]
# OpenADR 3.0 DER message feed
openadr = ["dep:openleadr-wire"]
# OCPI 2.3.0 roaming message feed (types are hand-rolled, no external dep)
ocpi = []
[dependencies]
bevy = { version = "0.17", default-features = false, features = [
# Core
"std",
"bevy_asset",
"bevy_state",
"bevy_color",
"bevy_image",
"bevy_log",
"bevy_camera",
# Rendering (2D only)
"bevy_sprite",
"bevy_sprite_render",
"bevy_text",
"bevy_ui",
"bevy_ui_render",
"bevy_render",
"bevy_core_pipeline",
# Windowing & Input
"bevy_window",
"bevy_winit",
# Picking (for UI interaction)
"bevy_picking",
# Audio
"bevy_audio",
"wav",
# Image formats
"png",
"gif",
# Text
"default_font",
# WASM support
"webgl2",
]}
bevy_northstar = { version = "0.5.0", default-features = false }
bevy_ecs_tiled = { git = "https://github.com/j-white/bevy_ecs_tiled", branch = "v0.10.0-patched" }
bevy_ecs_tilemap = "0.17"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
rand = "0.9"
image = { version = "0.25", default-features = false, features = ["gif"] }
thiserror = "2"
chrono = { version = "0.4", features = ["serde"] }
rustledger-core = { version = "0.9", default-features = false }
rust_decimal = { version = "1.40", features = ["serde"] }
rust_decimal_macros = "1.40"
rust-ocpp = { version = "2.0.1", default-features = false, features = ["v1_6"], optional = true }
openleadr-wire = { version = "0.1", default-features = false, optional = true }
# Native-only dependencies
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy = { version = "0.17", default-features = false, features = ["bevy_audio", "vorbis"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"], optional = true }
futures-util = { version = "0.3", optional = true }
webbrowser = "1"
[dev-dependencies]
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
wiremock = "0.6"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3"
[target.'cfg(target_os = "linux")'.dependencies]
bevy = { version = "0.17", default-features = false, features = ["x11", "wayland"] }
# WASM-only dependencies
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
console_error_panic_hook = "0.1"
reqwest = { version = "0.12", default-features = false, features = ["json"] }
js-sys = "0.3"
web-sys = { version = "0.3", features = ["HtmlAudioElement", "HtmlMediaElement", "Document", "Window", "Location", "WebSocket", "BinaryType", "MessageEvent"] }
# Enable optimization in dev for faster runtime
[profile.dev]
opt-level = 1
# Enable full optimization for dependencies in dev
[profile.dev.package."*"]
opt-level = 3
# Release optimizations
[profile.release]
lto = "thin"
codegen-units = 4 # Trade ~5-10% larger output for faster compile
# WASM release profile - optimized for size
[profile.wasm-release]
inherits = "release"
opt-level = "z"
lto = true
codegen-units = 1
strip = true
# Use forked Bevy with UI picking fix (UiScale coordinate mismatch)
[patch.crates-io]
bevy = { git = "https://github.com/j-white/bevy", rev = "bece35a17cad07f90745299229f77f4a8050d209" }
bevy_ui = { git = "https://github.com/j-white/bevy", rev = "bece35a17cad07f90745299229f77f4a8050d209" }