Anexo B. Tabla de compatibilidades entre Bevy 0.13 β†’ 0.19

ANEXO B Β· Material de referencia

"Bevy cambia. El que dice 'no rompe nada' te estΓ‘ mintiendo o no ha leΓ­do el CHANGELOG."

β€” Frase tatuada en el brazo de todo mantenedor de crates que dependen de Bevy.

Este anexo es una tabla de referencia rΓ‘pida para saber quΓ© API existΓ­a en quΓ© versiΓ³n. No pretende ser exhaustiva (el CHANGELOG de Bevy tiene 1500+ entradas por minor), sino dar la respuesta a las preguntas del tipo "ΒΏesto ya estaba en 0.16?" o "ΒΏesto se rompiΓ³ en 0.17?" sin tener que leer siete release notes.

**CHANGELOG**: archivo markdown en el repo de un proyecto donde se listan cambios por versiΓ³n. Bevy lo mantiene escrupulosamente en `bevyengine/bevy/CHANGELOG.md`.
**Breaking change**: cambio que rompe cΓ³digo existente. En semver, requiere bump de MINOR (0.X.0) o MAJOR (X.0.0).
**Feature flag**: ver glosario principal. En este anexo verΓ‘s `bevy_asset`, `bevy_sprite`, etc., que son las *feature collections* de 0.16+.

B.1 Leyenda

B.2 Tabla principal

API / Concepto0.130.140.150.160.170.180.19
Component deriveβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Resource deriveβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Bundle deriveβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Plugin traitβœ…βœ…βœ…βœ…βœ…βœ…βœ…
PluginGroup traitβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Required ComponentsβŒβŒβœ…βœ…βœ…βœ…βœ…
#[require(T)] macroβŒβŒβœ…βœ…βœ…βœ…βœ…
Component Hooks (on_add, on_insert, on_discard, on_remove)βŒβŒβœ…βœ…βœ…βœ…βœ…
HookContextβŒβŒβœ…βœ…βœ…βœ…βœ…
Observers❌❌⚠️ parcialβœ…βœ…βœ…βœ…
Observer deriveβŒβŒβŒβœ…βœ…βœ…βœ…
On<T> trigger eventβŒβŒβŒβœ…βœ…βœ…βœ…
EntityWorldMut::triggerβŒβŒβŒβœ…βœ…βœ…βœ…
Relations (bevy_ecs::Relationship)βŒβŒβŒβŒβœ…βœ…βœ…
Relationship deriveβŒβŒβŒβŒβœ…βœ…βœ…
RelationshipTarget deriveβŒβŒβŒβŒβœ…βœ…βœ…
Pair(From, To) shorthandβŒβŒβŒβŒβœ…βœ…βœ…
Linked filter en QueryβŒβŒβŒβŒβŒβœ…βœ…
Resources-as-Components (#[derive(Component)] impl Resource)❌❌⚠️ exp.βœ…βœ…βœ…βœ…
Render-Graph-as-SystemsβŒβŒβŒβŒβœ…βœ…βœ…
Render schedule expuesto como sistemas❌❌❌❌⚠️ parcialβœ…βœ…
RenderTarget separado de WindowβŒβŒβŒβŒβœ…βœ…βœ…
bevy_render::RenderTarget::ImageβŒβŒβŒβŒβœ…βœ…βœ…
Anchor como required componentβŒβŒβŒβŒβœ…βœ…βœ…
Text2d y Text3d separadosβŒβŒβŒβŒβœ…βœ…βœ…
TextBundle reemplazado por Text + Node + TextFont + TextColor❌⚠️ deprec.βœ…βœ…βœ…βœ…βœ…
SpriteBundle β†’ Sprite + Transform + Image (required comps)βŒβŒβŒβœ…βœ…βœ…βœ…
Camera2dBundle β†’ Camera2d soloβŒβš οΈβœ…βœ…βœ…βœ…βœ…
Mesh2d + MeshMaterial2d (en lugar de bundle)βŒβŒβš οΈβœ…βœ…βœ…βœ…
Time::delta_secs()βŒβœ…βœ…βœ…βœ…βœ…βœ…
Time::delta() (devuelve Duration)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
FixedUpdate scheduleβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Fixed::delta() configurableβŒβŒβŒβœ…βœ…βœ…βœ…
Fixed schedule graphβŒβŒβŒβŒβœ…βœ…βœ…
Time<()> vs Time<Virtual>βŒβŒβŒβœ…βœ…βœ…βœ…
Input<KeyCode> β†’ ButtonInput<KeyCode>❌⚠️ deprec.βœ…βœ…βœ…βœ…βœ…
MouseButton inputβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Gamepad inputβœ…βœ…βœ…βœ…βœ…βœ…βœ…
TouchInput eventβœ…βœ…βœ…βœ…βœ…βœ…βœ…
EventReader<T> / EventWriter<T>βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Events<T> recursoβœ…βœ…βœ…βœ…βœ…βœ…βœ…
EventRegistry (auto-register)βŒβŒβŒβœ…βœ…βœ…βœ…
app.add_event::<T>()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
States deriveβœ…βœ…βœ…βœ…βœ…βœ…βœ…
OnEnter / OnExit / OnTransition schedulesβœ…βœ…βœ…βœ…βœ…βœ…βœ…
NextState<T> recursoβœ…βœ…βœ…βœ…βœ…βœ…βœ…
SubStates / ComputedStates deriveβŒβŒβœ…βœ…βœ…βœ…βœ…
run_if(in_state)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
SystemSet deriveβœ…βœ…βœ…βœ…βœ…βœ…βœ…
SystemSet::chain()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
in_set(S) chainingβœ…βœ…βœ…βœ…βœ…βœ…βœ…
apply_deferred automΓ‘ticoβŒβŒβœ…βœ…βœ…βœ…βœ…
Commands::entity(e).insert(T)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Commands::entity(e).remove::<T>()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
EntityWorldMut API robustaβŒβš οΈβœ…βœ…βœ…βœ…βœ…
World::entity(e)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
World::spawn_empty()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Query::get_single / get_single_mutβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Query::iter() y iter_mut()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Query::par_iter()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
With<T> / Without<T> filtersβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Added<T> / Changed<T> filtersβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Or<(A, B)> filterβŒβŒβœ…βœ…βœ…βœ…βœ…
Optional<T> access en QueryβŒβŒβŒβœ…βœ…βœ…βœ…
Local<T> en sistemasβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Res<T> / ResMut<T>βœ…βœ…βœ…βœ…βœ…βœ…βœ…
NonSend<T> / NonSendMut<T>βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Deref / DerefMut en Queryβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Children / Parent componentesβœ…βœ…βš οΈ β†’ ChildOfβœ…βœ…βœ…βœ…
ChildOf componente (oficial)βŒβŒβŒβœ…βœ…βœ…βœ…
Propagate trait para transformacionesβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Transform y GlobalTransformβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Transform::from_xyz()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Transform::with_scale()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
glam::Vec2 / Vec3 / Vec4βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Color::srgb() / linear()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Color::hsla()βœ…βœ…βœ…βœ…βœ…βœ…βœ…
Text componente (separado de estilo)βŒβš οΈβœ…βœ…βœ…βœ…βœ…
TextFont componenteβŒβŒβœ…βœ…βœ…βœ…βœ…
TextColor componenteβŒβŒβœ…βœ…βœ…βœ…βœ…
TextSection (deprecado)βœ…βš οΈ deprec.❌❌❌❌❌
JustifyText y LineBreakβŒβŒβŒβœ…βœ…βœ…βœ…
Node componente UIβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Style componente UIβœ…βœ…βš οΈ β†’ Nodeβœ…βœ…βœ…βœ…
Flex layout automΓ‘ticoβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Grid layout (experimental)❌❌❌❌⚠️ exp.βœ…βœ…
bevy_ui separadoβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_picking crate oficialβŒβŒβŒβŒβœ…βœ…βœ…
OnPointer triggerβŒβŒβŒβŒβœ…βœ…βœ…
AssetServerβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Assets<T> storageβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Handle<T>βœ…βœ…βœ…βœ…βœ…βœ…βœ…
AssetEvent (Modified, Added, Removed)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
LoadState<T> para assetsβœ…βœ…βœ…βœ…βœ…βœ…βœ…
AssetLoader traitβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_asset feature collectionβŒβŒβŒβœ…βœ…βœ…βœ…
bevy_audio feature collectionβŒβŒβŒβœ…βœ…βœ…βœ…
bevy_render feature collectionβŒβŒβŒβœ…βœ…βœ…βœ…
bevy_sprite feature collectionβŒβŒβŒβœ…βœ…βœ…βœ…
bevy_text feature collectionβŒβŒβŒβœ…βœ…βœ…βœ…
bevy_pbr (3D)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_winit separadoβŒβš οΈβœ…βœ…βœ…βœ…βœ…
bevy_window separadoβŒβŒβœ…βœ…βœ…βœ…βœ…
Window componentβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Cursor componentβŒβŒβŒβœ…βœ…βœ…βœ…
WindowMode enumβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Msaa configurableβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Camera::clear_colorβœ…βœ…βœ…βœ…βœ…βœ…βœ…
TonemappingβŒβŒβŒβœ…βœ…βœ…βœ…
ColorGrading globalβŒβŒβŒβŒβŒβœ…βœ…
DACGamut / OutputColorSpaceβŒβŒβŒβŒβœ…βœ…βœ…
bevy_gizmos crateβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Gizmos resourceβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_log separadoβŒβŒβœ…βœ…βœ…βœ…βœ…
tracing integrationβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_diagnosticβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Diagnostics recursoβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_scene crateβœ…βœ…βœ…βœ…βœ…βœ…βœ…
DynamicScene / Sceneβœ…βœ…βœ…βœ…βœ…βœ…βœ…
DynamicSceneBuilderβŒβŒβœ…βœ…βœ…βœ…βœ…
SceneSpawnerβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Component derive con #[reflect(Component)]βŒβŒβŒβœ…βœ…βœ…βœ…
Reflect deriveβœ…βœ…βœ…βœ…βœ…βœ…βœ…
TypeRegistryβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_reflect mejor ergonomicsβŒβš οΈβœ…βœ…βœ…βœ…βœ…
FromReflectβœ…βœ…βœ…βœ…βœ…βœ…βœ…
AppTypeRegistry recursoβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_utilsβœ…βœ…βœ…βœ…βœ…βœ…βœ…
HashSet / HashMap re-exportsβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Duration re-exportβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Instant re-exportβœ…βœ…βœ…βœ…βœ…βœ…βœ…
ParallelCommandsβŒβŒβœ…βœ…βœ…βœ…βœ…
World::try_run_scheduleβŒβŒβŒβœ…βœ…βœ…βœ…
ScheduleLabel traitβœ…βœ…βœ…βœ…βœ…βœ…βœ…
IntoScheduleConfigs (ergonΓ³mico)βŒβŒβŒβœ…βœ…βœ…βœ…
SystemBuilder chainingβŒβŒβŒβœ…βœ…βœ…βœ…
Resource::from_arc (compartir entre worlds)βŒβŒβŒβŒβœ…βœ…βœ…
World::send_eventβŒβŒβŒβœ…βœ…βœ…βœ…
Bevy ui render world separadoβŒβŒβŒβŒβœ…βœ…βœ…
Mesh::insert_attributeβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Mesh::with_inserted_attributeβŒβŒβŒβœ…βœ…βœ…βœ…
StandardMaterialβœ…βœ…βœ…βœ…βœ…βœ…βœ…
MaterialExtension traitβŒβŒβŒβœ…βœ…βœ…βœ…
Material2d / Material3d pluginsβŒβš οΈβœ…βœ…βœ…βœ…βœ…
bevy_sprite::Material2dβŒβŒβœ…βœ…βœ…βœ…βœ…
Aabb componentβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Visibility / InheritedVisibilityβœ…βœ…βœ…βœ…βœ…βœ…βœ…
ViewVisibilityβœ…βœ…βœ…βœ…βœ…βœ…βœ…
ComputedVisibility (deprecado)βœ…βš οΈβŒβŒβŒβŒβŒ
SpatialBundleβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_hierarchy crateβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_state (oficial)βŒβŒβŒβœ…βœ…βœ…βœ…
StateMachine (build into Bevy)❌❌❌❌❌❌❌ (use crate externo)
bevy_dev_consoleβŒβŒβŒβŒβœ…βœ…βœ…
bevy_ecs_schedule_graphs❌❌❌❌❌⚠️ exp.⚠️ exp.
Mobile (iOS/Android) supportβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Web (WASM) supportβœ…βœ…βœ…βœ…βœ…βœ…βœ…
Pipelined renderingβŒβŒβŒβŒβš οΈβœ…βœ…
Parallel renderingβŒβŒβŒβŒβœ…βœ…βœ…
Multi-threaded asset loadingβŒβŒβŒβŒβœ…βœ…βœ…
Async asset loading (Tokio)βŒβŒβŒβš οΈβœ…βœ…βœ…
bevy_remote (BRP - Bevy Remote Protocol)βŒβŒβŒβœ…βœ…βœ…βœ…
BRP HTTP y WebSocketβŒβŒβŒβœ…βœ…βœ…βœ…
Component schema reflectionβŒβŒβŒβŒβŒβœ…βœ…
Resource schema reflectionβŒβŒβŒβŒβŒβœ…βœ…
Bevy Editor (oficial)❌❌❌❌❌❌❌ (aún no)
bevy_editor_pls (community)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_inspector_eguiβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_rapier (3D/2D physics)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_avian (alternativa fΓ­sica)βŒβŒβŒβŒβœ…βœ…βœ…
bevy_renet (networking)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_replicon (networking replicaciΓ³n)βŒβŒβŒβœ…βœ…βœ…βœ…
bevy_tweening (animaciones)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_hanabi (partΓ­culas)βœ…βœ…βœ…βœ…βœ…βœ…βœ…
leafwing-input-managerβœ…βœ…βœ…βœ…βœ…βœ…βœ…
bevy_kira_audioβœ…βœ…βœ…βœ…βœ…βœ…βœ…

B.3 Notas por categorΓ­a

B.3.1 Required Components (cap. 8)

Introducidos en 0.15. Reemplazan muchos Bundles. Marcador #[require(T)] en un componente aΓ±ade T automΓ‘ticamente cuando se inserta el primero.

#[derive(Component)]
#[require(Sprite)]
struct Player; // Al spawnear Player, tambiΓ©n spawnas Sprite (vacΓ­o).

B.3.2 Component Hooks (cap. 9)

Lanzados en 0.14 como RFC, estables en 0.15. Permiten ejecutar lΓ³gica cuando un componente se aΓ±ade (on_add), se inserta (on_insert), se descarta (on_discard, renombrado de on_replace en 0.19 vΓ­a PR #22789) o se quita (on_remove). Imprescindible para mantener Γ­ndices sincronizados.

B.3.3 Observers (cap. 10)

Introducidos experimentalmente en 0.14, estables en 0.15, mejorados en 0.16. Son sistemas que escuchan triggers sobre una entidad especΓ­fica. Complementan (no sustituyen) a EventWriter/EventReader.

#[derive(Event)]
struct Click;

commands.spawn(Player).observe(|trigger: Trigger<Click>, ...| {
    // Reacciona a Click sobre ESTA entidad.
});

B.3.4 Relations (cap. 11)

Lanzadas en 0.17. Permiten definir relaciones tipadas entre entidades. Parent/Children se reescribieron sobre Relations internamente.

#[derive(Component)]
#[relationship(relationship_target = OwnedBy)]
struct Owned(Entity);

#[derive(Component)]
#[relationship_target(relationship = Owned)]
struct OwnedBy(Vec<Entity>);

B.3.5 Resources-as-Components

RFC experimental en 0.15, estabilizado en 0.16. Un Resource puede derivar Component para ser usado como dato de entidad en sistemas especΓ­ficos (e.g. datos globales que tambiΓ©n necesitan query por componente).

B.3.6 Render-Graph-as-Systems

Antes de 0.17, el render era una caja negra. Ahora los render passes son sistemas que puedes aΓ±adir a Render schedule. MΓ‘s flexible, mΓ‘s depurable.

B.3.7 RenderTarget separado

En 0.17 se introdujo RenderTarget::Image para dibujar a una textura en lugar de a la ventana. Habilita post-procesado, minimapas, y render-to-texture.

B.3.8 Anchor como required component

Anchor (pivote de sprites/texto) pasΓ³ de ser un campo de Sprite/Text a ser un componente independiente y required component en 0.17. Permite pivotar entidades sin sprite (e.g. texto UI) sin duplicar el campo.

B.3.9 FixedUpdate schedule

FixedUpdate siempre estuvo, pero en 0.16 se volviΓ³ configurable el delta (Time<Fixed>::set_duration). En 0.17 el schedule graph permite sistemas con dependencias explΓ­citas en fixed timestep.

B.3.10 Cargo feature collections

Desde 0.16, las features de Bevy se reorganizaron en feature collections: bevy_asset, bevy_audio, bevy_render, bevy_sprite, bevy_text, etc. Activar default-features = false y luego features = ["bevy_asset"] te da binarios mΓ‘s pequeΓ±os. Era imposible en 0.13-0.15.

# 0.13
bevy = "0.13"

# 0.19
bevy = { version = "0.19", default-features = false, features = ["bevy_asset", "bevy_sprite"] }

B.4 Resumen de cambios incompatibles (lo que rompe tu cΓ³digo)

Si vienes de 0.13 y subes a 0.19, esta es tu lista de la compra de breaking changes:

VersiΓ³nCambioAcciΓ³n
0.14Input<KeyCode> β†’ ButtonInput<KeyCode>Reemplazar todas las ocurrencias
0.14TextSection deprecatedMigrar a Text + TextFont + TextColor
0.15Bundles reemplazados por required components en muchos casosReemplazar SpriteBundle por Sprite + Transform + Image
0.15Children/Parent separados β†’ unificados en jerarquΓ­a ChildOfRevisar cΓ³digo de jerarquΓ­as
0.15apply_deferred se vuelve automΓ‘tico en muchos puntosQuitar llamadas manuales donde ya no hacen falta
0.16Features reorganizadasActualizar Cargo.toml
0.16Time<()> y Time<Virtual> diferenciadosRevisar uso de Time en sistemas
0.17RenderTarget separadoSi dibujabas a textura, usar la nueva API
0.17Anchor es required componentQuitar anchor de struct literals
0.18Pipelined rendering activado por defectoSi tenΓ­as workarounds para el single-thread render, revisa
0.15SubStates / ComputedStates oficialesSi tenΓ­as jerarquΓ­as de estado custom, evalΓΊa migrar
0.19#[reflect(Resource)] tambiΓ©n refleja Component; ReflectResource es ZSTSi usabas BRP o bevy_world_serialization con ReflectResource, migra a ReflectComponent
0.19bsn! macro para escenas next-genSi usabas DynamicScene exclusivamente, considera migrar para escenas declarativas (cap 12)
**Metedura de pata del anexo**: hacer `cargo update` y esperar que todo siga funcionando. Cada minor de Bevy ha tenido al menos 1 breaking change. Lee el CHANGELOG. LΓ©elo otra vez. LΓ©elo en voz alta si hace falta. El compilador te lo agradecerΓ‘.

B.5 CΓ³mo migrar: receta rΓ‘pida

  1. Lee el CHANGELOG de la versiΓ³n destino antes de subir.
  2. Fija versiΓ³n con @: bevy = "0.19.1" en Cargo.toml para evitar sorpresas.
  3. Migra de minor en minor (0.13 β†’ 0.14 β†’ 0.15 β†’ ...). Saltarse versiones multiplica los conflictos.
  4. Usa cargo fix --edition para sugerencias automΓ‘ticas, pero revΓ­salas: a veces el fix propuesto no es el mΓ‘s limpio.
  5. Tests como red de seguridad: si tienes tests, son tu guΓ­a. Si no tienes, este es el momento.
  6. Benchmarks antes y despuΓ©s: algunas "mejoras" de rendimiento en realidad empeoran tu caso concreto.
**ΒΏSabΓ­as que…?** Bevy publica un *migration guide* oficial en `https://bevy.org/learn/migration-guides/0-18-to-0-19/` (un *path* por cada par de versiones) que lista cada cambio con ejemplos de "antes/despuΓ©s". Es una mina de oro y pocos lo leen. Ahora tΓΊ ya sabes que existe.

B.6 ΒΏQuΓ© viene despuΓ©s del 0.19?

No somos videntes, pero la hoja de ruta pΓΊblica menciona:

Hasta entonces, este anexo cubre lo que necesitas para moverte entre 0.13 y 0.19 sin tirarte de los pelos. Β‘Suerte!