Skip to content

Upgrade to Bevy 0.19 and adopt 0.19 idioms (required components, BSN, validation parity) - #77

Open
rozgo wants to merge 3 commits into
aevyrie:mainfrom
VertexStudio:bevy-0.19
Open

Upgrade to Bevy 0.19 and adopt 0.19 idioms (required components, BSN, validation parity)#77
rozgo wants to merge 3 commits into
aevyrie:mainfrom
VertexStudio:bevy-0.19

Conversation

@rozgo

@rozgo rozgo commented Jul 14, 2026

Copy link
Copy Markdown

Objective

Upgrade big_space to Bevy 0.19.0 — and adopt Bevy 0.19's idioms end to end rather than doing the minimum to compile, positioning the crate for where Bevy is heading (required components everywhere, BSN / editor era).

Baseline migration

The mechanical migration largely matches #73 (done independently — thanks @m-edlund): pins bumped to 0.19.0, SceneRootWorldAssetRoot, FontSize::Px, TextLayout::justify, shadow_maps_enabled, Hdr from bevy::camera, optional Skybox::image, fallible SystemState::get_mut, README compat table, version bump to 0.13.0.

Beyond the baseline

  • Bundles → required components (breaking, fits the 0.13 release): BigSpatialBundle, BigGridBundle, and BigSpaceRootBundle are removed.
    • BigSpace requires Grid + GlobalTransform (+ Visibility with the camera feature) — a root is now just commands.spawn(BigSpace::default()).
    • FloatingOrigin requires CellCoord, so spawn(FloatingOrigin) is a complete, valid origin.
    • CellCoord additionally requires Visibility (camera feature), so visibility hierarchies can no longer silently break on intermediate spatial nodes.
    • spawn_spatial / spawn_grid now spawn a single component and let requires fill in the rest.
  • BSN support out of the box: all big_space components are Default + Clone, which makes them bsn!-authorable with zero new dependencies (BSN templates are blanket-implemented for Default + Clone). A new bsn example declares an entire floating-origin world — root grid, floating-origin camera, a constellation of cells — as data. This addresses the bsn! integration gap noted in the update to bevy 0.19 #73 discussion.
  • Validation parity with stock Bevy: on 0.19, TransformPlugin installs ValidateParentHasComponentPlugin::<GlobalTransform> — which every big_space app silently loses, since TransformPlugin must be disabled. BigSpacePropagationPlugin now installs it itself.
  • multi_threaded feature: Bevy 0.19 no longer implies parallel transform propagation via std; it's an explicit opt-in. big_space now mirrors that with a multi_threaded passthrough (bevy_ecs / bevy_tasks / bevy_transform), so subcrate-only consumers can opt in; full-bevy users get it via feature unification as before.
  • Debug cell labels: BigSpaceDebugSettings::label_cells draws occupied-cell coordinates with 0.19's new text gizmos.
  • Green on Rust 1.97: current stable's clippy added some_filter and while_let_loop, which fire on pre-existing code in floating_origins.rs and stationary.rs and fail the -D warnings CI job. Fixed here.
  • CHANGELOG entries for all of the above.

Design note for reviewers

Grid deliberately does not require Transform or CellCoord: a BigSpace root must never have a Transform — its absence is the invariant that keeps the low-precision compat propagation (bevy_compat::propagate_parent_transforms) disjoint from the high-precision propagation. This invariant is now documented at the BigSpace definition.

Relationship to #73

This PR is a superset of #73's migration, so feel free to treat them as alternatives. Two small notes on #73 in case it's preferred as the base: it accidentally renames GLTF_SceneRootNodeGLTF_WorldAssetRootNode inside assets/models/low_poly_spaceship/scene.gltf (that string is Blender's exporter node naming, unrelated to the Bevy API), and its CI ran before Rust 1.97, so the new clippy lints above will fail its next re-run. If maintainers prefer merging #73 first, the modernization commits here rebase cleanly on top.

Testing

  • Full CI matrix locally on stable 1.97: fmt, check --all-features --all-targets, check --no-default-features --features=libm, clippy -D warnings, doc -D warnings , 40/40 tests + doctests, wasm32 check.
  • Ran the minimal and new bsn examples against Bevy 0.19.0 — no warnings, panics, or hierarchy-validation errors.

rozgo added 3 commits June 16, 2026 23:58
- Replace component bundles with required components: BigSpace requires
  Grid + GlobalTransform (+ Visibility with the camera feature),
  FloatingOrigin requires CellCoord, and CellCoord now also requires
  Visibility. BigSpatialBundle, BigGridBundle, and BigSpaceRootBundle
  are removed.
- Update dependency pins from 0.19.0-rc.3 to the final 0.19.0 release.
- Add BSN support: all components are Default + Clone, making them
  bsn!-authorable with no extra dependency; add examples/bsn.rs.
- Install ValidateParentHasComponentPlugin::<GlobalTransform> in
  BigSpacePropagationPlugin, restoring the hierarchy validation apps
  lose by disabling TransformPlugin on bevy 0.19.
- Add a multi_threaded passthrough feature mirroring bevy_transform
  0.19's explicit multi_threaded opt-in.
- Add BigSpaceDebugSettings::label_cells, drawing occupied-cell
  coordinates with bevy 0.19 text gizmos.
- Fix new clippy 1.97 lints (some_filter, while_let_loop).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant