mevy supports Bevy 0.15 through 0.18 via Cargo features. All API differences are handled automatically — you don’t need to change your code when switching versions.
Bevy changes its APIs between minor versions. For example, BoxShadow changed from a direct struct to Vec<ShadowStyle> in 0.16, and BorderColor changed from a single value to per-edge in 0.17. mevy handles these differences for you, but it needs to know which version you’re targeting to generate the correct code.
You must specify the Bevy version feature:
[dependencies]
mevy = { version = "0.3", features = ["0.18"] }
The following patterns are stable across all supported versions:
code!{} hex color and Val syntax
ui!{} field names and edge/corner selection
entity!{} selector syntax
All shorthand aliases (w, h, bg, px, etc.)
You can write the same mevy code for Bevy 0.15 and 0.18 — just change the version feature.
Feature mevy_ui mevy_core mevy_ecs
0.15✅ ✅ ✅
0.16✅ ✅ ✅
0.16-rc✅ ✅ ✅
0.17✅ ✅ ✅
0.18✅ ✅ ✅
These are the API changes mevy handles automatically. You don’t need to do anything — just set the correct version feature.
Version Field Path
0.15 BoxShadow::blur_radius (direct field)
0.16+ BoxShadow::[0].blur_radius (array access)
Version Field Path
0.15 BorderRadius::top_left (direct field)
0.18+ Node::border_radius.top_left (on Node)
Version Field Path
0.15-0.16 ScrollPosition::x_offset, y_offset
0.17+ ScrollPosition::x, y
Version Component
0.15-0.17 TextFont::line_height
0.18+ Separate LineHeight component
Version Structure
0.15-0.16 BorderColor(Srgba) (single value)
0.17+ BorderColor { top, right, bottom, left } (per-edge)
Version Trigger Type Entity Access
0.15 Trigger::<T>trigger.entity()
0.16 Trigger::<T>trigger.target()
0.17+ On::<T>trigger.event_target()
Version Methods
0.15 .parent_entity(), .spawn(...)
0.16+ .target_entity(), .commands_mut()
Version Method
0.15 .set_parent(parent)
0.16+ .insert(ChildOf(parent))
Installation — Setup and version selection
Migration Guide — Step-by-step migration between versions
FAQ — Common questions about version compatibility