zaycev / bevy-magic-light-2d

Experiment with computing 2D shading, lighting and shadows with Bevy Engine
Apache License 2.0
427 stars 37 forks source link

Enable default bevy features in examples #16

Closed SpecificProtagonist closed 1 year ago

SpecificProtagonist commented 1 year ago

Fixes #15

Enable default bevy features (including x11) in examples/tests but not for using bevy_magic_light_2d as a dependency.

Also made Wayland optional. ~It's still enabled by default though because winit requires either it or X11.~

SpecificProtagonist commented 1 year ago

I don't want wayland to be enabled by default either, I added the feature because otherwise cargo check fails. Removed it again; cargo check now needs to be run as cargo check --features bevy/wayland (or bevy/x11).

SpecificProtagonist commented 1 year ago

While we're discussing Cargo.toml:

[profile.release]
codegen-units = 1
# debug = false
lto = "thin"
# opt-level = 3
panic = "abort"

[profile.dev.package."*"]
opt-level = 3
# debug = true
# incremental = true

[profile.dev]
codegen-units = 16
# opt-level = 0
# debug = true
# incremental = true

The commented lines can be removed as they match the default. codegen-units = 16 can probably go to as the default is 256. Also, is the panic = abort and codegen-units = 1 necessary? These profiles only affect examples, not programs that use bevy_magic_light_2d as a dependency.