Bevy

Updated Aug 02, 2026

The workspace targets the Bevy 0.18.1 release line. Keep the entire Bevy surface on one minor line: never mix major/minor families across type signatures, imports, plugins, events, or system parameters.

Active Bevy dependency versions (workspace and direct subcrates):

Dependency Version Notes
bevy 0.18.1 Workspace dependency, default-features = false, reflect_auto_register; Linux target adds x11.
bevy_app 0.18.1 Direct subcrate.
bevy_ecs 0.18.1 Direct subcrate.
bevy_math 0.18.1 Direct subcrate.
bevy_reflect 0.18.1 Feature auto_register_inventory.
bevy_transform 0.18.1 Direct subcrate.
bevy_log 0.18.1 Optional; enabled through the render feature.

The optional renderer is gated behind the render feature (which pulls in the Bevy asset, core-pipeline, render, sprite, winit, log, and PNG features); the text feature layers bevy/bevy_text on top.

Buffered events use the Message API

Bevy 0.18 split buffered events from observer events:

  • Buffered events derive Message and are read/written with MessageReader<T> / MessageWriter<T>; from a World, use World::write_message. This is what TiledEvent<MapCreated> uses.
  • Observer events derive Event and are consumed via On<T> observers, emitted with Commands::trigger / World::trigger and registered with App::add_observer. Lille's LilleMapError, UnloadPrimaryMap, PrimaryMapUnloaded, DbspSyncError, and DbspDamageIngress are observer events.

App is #[must_use] in Bevy 0.18, so do not add a bare #[must_use] to functions that return App; clippy::double_must_use will reject it.

The migrated buffered-message surface is guarded two ways. The runtime map integration tests exercise it dynamically, and a trybuild compile-pass harness pins it statically: tests/compile_pass.rs compiles the fixture tests/compile_pass/message_reader_migration.rs, which uses MessageReader<TiledEvent<MapCreated>> and World::write_message. Reintroducing the legacy EventReader / World::send_event names breaks the fixture. Run it with:

cargo test --features test-support --test compile_pass

The harness is gated on test-support (like the other map tests), so it also runs as part of make test (which passes --features test-support) and the CI coverage step. The fixture is a standalone crate, so bevy_ecs_tiled is carried as a non-optional dev-dependency purely to make it nameable there.