optimize size
This commit is contained in:
parent
e4c3716f80
commit
d8bef225f9
10
Cargo.toml
10
Cargo.toml
|
@ -13,3 +13,13 @@ rand_distr = "0.4.3"
|
||||||
serde = { version = "1.0.152", features = ["derive"] }
|
serde = { version = "1.0.152", features = ["derive"] }
|
||||||
serde_json = "1.0.91"
|
serde_json = "1.0.91"
|
||||||
tinyfiledialogs = "3.9.1"
|
tinyfiledialogs = "3.9.1"
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
opt-level = 3
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = 'z' # Optimize for size
|
||||||
|
lto = true # Enable link-time optimization
|
||||||
|
codegen-units = 1 # Reduce number of codegen units to increase optimizations
|
||||||
|
panic = 'abort' # Abort on panic
|
||||||
|
strip = true # Strip symbols from binary*
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![windows_subsystem = "windows"]
|
||||||
|
|
||||||
mod asteroids;
|
mod asteroids;
|
||||||
mod nn;
|
mod nn;
|
||||||
mod player;
|
mod player;
|
||||||
|
|
|
@ -20,8 +20,8 @@ pub struct Player {
|
||||||
inputs: Vec<f32>,
|
inputs: Vec<f32>,
|
||||||
pub outputs: Vec<f32>,
|
pub outputs: Vec<f32>,
|
||||||
// asteroid_data: Vec<(f32, f32, f32)>,
|
// asteroid_data: Vec<(f32, f32, f32)>,
|
||||||
last_shot: u8,
|
last_shot: u32,
|
||||||
shot_interval: u8,
|
shot_interval: u32,
|
||||||
pub brain: Option<NN>,
|
pub brain: Option<NN>,
|
||||||
alive: bool,
|
alive: bool,
|
||||||
pub lifespan: u32,
|
pub lifespan: u32,
|
||||||
|
|
Loading…
Reference in New Issue