-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
51 lines (46 loc) · 2.12 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
# Project metadata
[package]
name = "rusty_pong"
version = "0.1.0"
edition = "2021"
authors = ["0xAlcibiades <[email protected]>"]
# Dependencies with minimal feature selection for optimal binary size while maintaining functionality
[dependencies]
# Bevy game engine with carefully selected features:
bevy = { version = "0.15.0", features = [
"bevy_asset", # Asset loading system
"bevy_core_pipeline", # Core rendering pipeline
"bevy_render", # Basic rendering functionality
"bevy_sprite", # 2D sprite support
"bevy_text", # Text rendering for UI
"bevy_ui", # User interface system
"bevy_window", # Window management
"bevy_winit", # Window creation and event handling
"default_font", # Include default font for text
"multi_threaded", # Enable multithreading for native builds
"png", # PNG image support
"webgl2", # WebGL 2.0 support for web buildsr
"webgpu", # WebGPU support for modern browsers
"x11", # Linux display server support
"bevy_state", # For GameState management
"bevy_color", # Color utilities
], default-features = false } # Disable default features to minimize size
# Audio system that works with WASM
bevy_kira_audio = { version = "0.21.0", features = ["flac"], default-features = false }
# 2D physics engine for ball and paddle physics
bevy_rapier2d = "0.28.0"
# Random number generation for game mechanics
rand = "0.8.5"
# Release build optimization settings
[profile.release]
opt-level = 'z' # Optimize for size rather than speed
lto = true # Enable link-time optimization
panic = 'abort' # Remove panic handling code
strip = true # Strip symbols from binary
overflow-checks = false # Disable integer overflow checks
# Optimize dependencies even in debug builds
[profile.dev.package."*"]
opt-level = 3 # Maximum optimization for dependencies
# Debug build settings for the main package
[profile.dev]
opt-level = 1 # Minimal optimization for faster compilation