Skip to content

Bump rerun and bevy examples to their latest - #13

Open
haydenflinner wants to merge 21 commits into
rerun-io:mainfrom
haydenflinner:bump-rerun-0.35-bevy-0.19
Open

Bump rerun and bevy examples to their latest#13
haydenflinner wants to merge 21 commits into
rerun-io:mainfrom
haydenflinner:bump-rerun-0.35-bevy-0.19

Conversation

@haydenflinner

Copy link
Copy Markdown

Bump rerun to 0.35 and bevy to 0.19.

Also includes an example of stepping,

Wumpf and others added 13 commits July 15, 2025 18:28
…ort)

Builds on the existing (unmerged) andreas/rerun_024 branch, which already
did the real work of porting off the old ComponentName/serialized()-with-
no-args API to the ComponentDescriptor/ComponentType/serialized(descriptor)
API rerun settled on starting in 0.24. That branch depended on a local
`../rerun` checkout; switch it to the published 0.24.0 crate so it builds
standalone, and bump the toolchain to 1.88 (a transitive dep needs stable
let-chains, stabilized in 1.88).

Smoke-tested via `cargo run --example 3d_shapes`: the Bevy window renders
correctly. The Rerun viewer panel itself won't be right until the SDK
matches the installed 0.35 viewer (next stage) -- expect a version-mismatch
warning and no data in the viewer for now.
Rerun's core logging API (ComponentDescriptor/ComponentBatch/serialized())
has been stable since 0.24, so this is a single jump rather than 11
individual version bumps -- confirmed against the migration guides that
nothing in revy's surface changed in 0.25-0.34. Two things did:

- `Transform3D::with_axis_length()` was removed; axes are now opt-in via a
  separate `TransformAxes3D` archetype. revy was calling it with 0.0 to
  keep axes hidden, which is now just the default -- the call is deleted
  rather than replaced.
- `ComponentIdentifier`/`ArchetypeName`/`ComponentType` tightened their
  `From` impls to `&'static str` only, so building one from an owned
  `String`/borrowed `&str` (as revy's dynamic component-name logic does)
  now goes through the fallible `try_new()` instead of `.into()`.

Also bumps rustc to 1.97.0 (rerun 0.35 requires 1.95+; the toolchain
pinned in stage 1 doesn't reach that).

Smoke-tested via `cargo run --example 3d_shapes` with the Rerun Viewer
(now version-matched at 0.35): scene renders and streams correctly.
Core ECS/hierarchy changes:
- `Parent` renamed to `ChildOf` (its `Deref`/`.get()` replaced by `.parent()`);
  updated every hierarchy-walking query and the `bevy_parent`/`bevy_children`
  default loggers.
- `bevy::utils::HashMap`/`AHasher` relocated to `bevy_platform` (default
  hasher is now foldhash, not ahash); switched the manual reflection-hash
  code to `FixedHasher::hash_one`.
- `World::inspect_entity` now returns a `Result` -- the old code compiled
  because `Result` also implements `IntoIterator`, but iterated the wrong
  thing (the outer `Result`, once, rather than the inner `ComponentInfo`s).
  Now explicitly unwrapped.
- `ComponentInfo::name()` now returns `DebugName` (a `Deref<Target = str>`
  wrapper, real data since bevy's default `debug` feature is on) instead of
  `&str`.
- `Events<T>`/`EventCursor` renamed to `Messages<T>`/`MessageCursor`.

Crate-split import churn (mesh/camera/image pulled out of bevy_render into
their own crates): `bevy::render::mesh` -> `bevy::mesh`,
`bevy::render::primitives::Aabb` -> `bevy::camera::primitives::Aabb`,
`OrthographicProjection`/`PerspectiveProjection` are no longer `Component`s
in their own right (only the `Projection` enum wrapping them is), so their
default-logger entries are removed as dead code; `Projection` also grew a
`Custom` variant.

`Image::data` is now `Option<Vec<u8>>` (render-target-only images have no
CPU-side data); `Transform3D`... already handled in stage 2.

Also swapped all three `examples/*.rs` files for their current upstream
(bevy v0.17.3) versions with revy's plugin-injection block re-applied at
the same point -- they were straight copies of Bevy's own example games
(per their doc comments) and had unrelated 0.15-era breakage (`Event`
derive vs `Message`, `despawn_recursive`, `StateScoped` as a function,
rand 0.8 vs 0.9 `gen_range`/`random_range`) that upstream had already fixed.
breakout's companion `stepping.rs` module moved it to `examples/breakout/`
so Cargo's example auto-discovery doesn't treat that helper module as its
own binary.

Smoke-tested via `cargo run --example breakout`: paddle/ball/brick physics,
collisions, and the Rerun-side hierarchy/transform sync all work correctly.
- `PerspectiveProjection` grew a `near_clip_plane` field; add it to the
  already-partial destructure in `to_rerun()`.
- Enable bevy's `debug` feature explicitly. It was on by default through
  0.17, but 0.19 slimmed bevy's default feature set down to just
  `2d`/`3d`/`ui`/`audio` and dropped it. Without it, `ComponentInfo::name()`
  (a `DebugName` since the 0.17 crate split) returns a placeholder string
  instead of the real component type name -- which silently breaks *all*
  of revy's name-keyed logger dispatch (both the default loggers and the
  reflection-fallback path), since every component collapses to the same
  placeholder key. Entities still get logged (as generic text), so nothing
  crashes or errors, but nothing spatial ever gets recognized -- exactly
  the "matches N entities, can't visualize any of them" symptom the Rerun
  Viewer shows for a view with no compatible archetypes. Caught this by
  instrumenting `sync_components` with temporary counters (removed again
  before this commit) confirming zero `Transform` components were ever
  observed by name despite ~1900 entities being synced per frame.

- Swapped `examples/*.rs` for their current upstream (bevy v0.19.0)
  versions again, same as stage 3: the `games/` examples directory was
  renamed to `showcase/` upstream, and alien_cake_addict's RNG setup moved
  from `rand_chacha` to `rand 0.10` + the `chacha20` crate (`RngExt`,
  `make_rng`).

Smoke-tested via `cargo run --example alien_cake_addict`: game logic and,
after the `debug`-feature fix, the Rerun Viewer's spatial visualization of
the tile grid / player / cakes all work correctly.

Known limitation, left as-is: revy's sync loop re-reflects every entity's
every component every frame regardless of whether it actually changed
(flagged in its own long-standing TODOs), which reads as sluggish on a
scene with a few thousand entities. Not a regression introduced by this
migration; left for a separate follow-up.
Viewer install instructions and the version-matching note were still
pointing at 0.22; add a compatibility table row for bevy 0.19 / rerun 0.35.
Found while profiling alien_cake_addict with the Rerun Viewer's built-in
puffin profiler: a single frame had 40k+ profiler scopes and was spending
most of its time blocked on background query/visualizer threads, pointing
at revy pushing far more entities into the recording than the game
actually has.

Since bevy 0.19, every `Resource` is backed by a real (hidden) entity
tagged `IsResource` (part of the "resources are components" change), so
`world.query::<Entity>()` in `sync_components` was also walking and
logging every resource in the app as if it were a game entity -- ~300 of
them with `DefaultPlugins` in this example, none of it meaningful data.
Filtering them out with `Without<IsResource>` drops the per-frame entity
count from 1887 to 1587.

Also add a `profiling` Cargo profile (release opts + debug symbols) for
`cargo flamegraph`/perf work going forward.

The remaining ~1587 entities are mostly legitimate (the example's board
alone is 14x21 = 294 tiles), and revy's sync loop still fully re-walks and
reflects every one of them every frame regardless of whether anything
changed -- that's the real remaining cost, and is a pre-existing
architectural characteristic, not something fixed here.
…ECS data

Two changes requested after looking at the recording in the Rerun viewer:

- Tiles were spawned flat and unparented, so all 294 of them (14x21 board)
  showed up as same-looking, cryptically-named siblings of the player and
  camera in the entity tree. Spawn a `board` parent entity (`Name::new`d,
  with an identity `Transform`/`Visibility` so propagation to children
  still works -- bevy warns loudly, B0004, if a parent lacks
  `Visibility` while children have `InheritedVisibility`) and reparent
  each tile under it via `ChildOf`, named `tile_{i}_{j}`. Visual/gameplay
  behavior is unchanged (tile positions were already absolute, and an
  identity parent transform is a no-op); `DespawnOnExit` only needs to
  live on `board` now since despawn is recursive by default.

- Raw keyboard input (`ButtonInput<KeyCode>`) is a `Resource`, which is
  invisible to revy (it only walks Entities). Added a `UserInput`
  component on its own `input`-named entity, a `capture_user_input`
  system that copies the relevant key states into it each frame, and
  reordered `move_player` to run after it and read `Single<&UserInput>`
  instead of polling `ButtonInput<KeyCode>` directly. From the player's
  perspective this is a no-op -- movement still reacts to the same keys
  the same frame -- but input is now itself logged ECS data, on its own
  entity separate from the tile grid, rather than invisible resource
  state.

Also blacklist `bevy_ecs::observer::distributed_storage::ObservedBy`
(bevy-internal bookkeeping auto-attached to any entity with observers
watching it) in `DefaultRerunComponentLoggers`, same as the existing
`RerunEntityPath` entry -- found showing up as noise after the above
changes.
@emilk
emilk requested review from emilk and a lite review from Copilot August 11, 2026 09:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates revy to match newer upstream dependencies (Rerun 0.35, Bevy 0.19) and refreshes the vendored Bevy examples accordingly, including a new stepping/inspection helper.

Changes:

  • Bump crate + docs to Rerun 0.35 and Bevy 0.19, updating component naming and ECS APIs (Parent→ChildOf, Events→Messages, etc.).
  • Adjust default loggers/sync logic for Bevy 0.19 (resource-backed entities, updated component paths, descriptor changes).
  • Refresh vendored examples to Bevy 0.19 versions and add a stepping UI helper example.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/sync.rs Updates sync logic for Bevy 0.19 APIs (FrameCount path, Messages, ChildOf, resource-entity filtering, hashing).
src/rerun_logger.rs Updates logger dispatch/types for Rerun 0.35 and Bevy 0.19 hierarchy changes.
src/lib.rs Reorders re-exports to match updated module changes.
src/entity_path.rs Switches ancestry traversal from Parent to ChildOf.
src/default_loggers.rs Updates default logger registrations and descriptors for Bevy 0.19 component paths/types.
src/conversions.rs Updates Bevy type paths and adjusts projection/image conversion behavior for newer APIs.
rust-toolchain Updates pinned Rust toolchain version.
README.md Updates documented Rerun/Revy versions and usage text.
examples/README.md Updates pointer to where the vendored examples originate from upstream Bevy.
examples/breakout/stepping.rs Adds stepping UI helper schedule/plugin for the breakout example.
examples/breakout/main.rs Updates breakout example to Bevy 0.19 patterns (observers, UI, required components).
examples/alien_cake_addict.rs Updates alien_cake_addict example to Bevy 0.19 patterns and newer RNG APIs; adds input capture entity for recording visibility.
examples/3d_shapes.rs Updates 3d_shapes example to Bevy 0.19 APIs and expands content/controls.
clippy.toml Updates MSRV for clippy configuration.
Cargo.toml Bumps crate version to 0.35.0, updates edition/rust-version, and dependency versions/features.
.github/workflows/rust.yml Updates CI toolchain/rust-version to 1.88.0.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rust-toolchain
Comment thread examples/README.md Outdated
Comment thread README.md Outdated
Aligns MSRV declarations (Cargo.toml, clippy.toml, CI workflow) and the
rust-toolchain channel, fixes a README indentation nit, and updates the
examples README link to reference the bevy 0.19 examples tree.
@emilk

emilk commented Aug 18, 2026

Copy link
Copy Markdown
Member

@claude please take a look at the CI failures

emilk and others added 6 commits August 18, 2026 13:15
bevy 0.19 enables both `x11` and `wayland` in its default feature set (via
`default_platform`), so `wayland-sys` now needs `wayland-client.pc` at build
time.

cargo-deny-action v1 ships a cargo-deny too old to parse CVSS 4.0 scores, which
now appear in the RustSec advisory database (e.g. RUSTSEC-2026-0038), making
every run fail while loading the database.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…5-bevy-0.19

Brings in the CI fixes: install libwayland-dev (bevy 0.19 enables the
`wayland` feature by default) and bump cargo-deny-action to v2 (v1 cannot
parse CVSS 4.0 scores in the RustSec advisory database).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`cargo update -p h2` fixes RUSTSEC-2026-0258 (h2 unbounded empty DATA frames)
outright, so it needs no ignore.

deny.toml:
* ignore RUSTSEC-2026-0192: `ttf-parser` is unmaintained and has no safe
  upgrade. It reaches us via bevy -> winit -> sctk-adwaita -> ab_glyph.
* allow CDLA-Permissive-2.0, the license of `webpki-roots` 1.0.
* add the crates that bevy 0.19 and rerun 0.35 now duplicate to `skip-tree`,
  and drop `re_arrow2`, which rerun no longer depends on.

`cargo deny check` now reports: advisories ok, bans ok, licenses ok, sources ok.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The old dependencies tripped ten RustSec advisories. Most are fixed by a
lockfile update, but the patched `time` needs a compiler that understands
edition 2024, hence the MSRV bump.

`cargo update` fixes `bytes`, `crossbeam-epoch`, `h2`, `lz4_flex`, `time` and
`tracing-subscriber`. The three that remain need semver-major bumps we cannot do
here, so deny.toml ignores them:
* RUSTSEC-2026-0097: `rand` 0.8 is unsound; the fix is in `rand` 0.9.
* RUSTSEC-2026-0192: `ttf-parser` is unmaintained, with no safe upgrade.
* RUSTSEC-2026-0206: `rustybuzz` is unmaintained, reached via `cosmic-text`.

`twox-hash` joins `skip-tree`, since the newer `lz4_flex` uses 2.x while rerun
is still on 1.x.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cargo-cranky is unmaintained, and Cargo has supported lint tables since 1.74, so
the lints move into Cargo.toml and CI calls `cargo clippy` directly.

The lint set is the one from rerun_template: all of `clippy::pedantic` on, with
the unhelpful ones opted out one by one.
See rerun-io/rerun_template#43.

`disallowed-macros` now says `std::dbg`, since plain `dbg` does not name a
reachable macro and clippy 1.95 warns about it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mostly mechanical, from `cargo clippy --fix`: `use_self`, trait imports as `_`,
`?` instead of `and_then` chains, `is_some_and` instead of `map_or`, and
`#[expect]` instead of `#[allow]`.

By hand:
* `ancestors_from_world` uses `?` rather than nested `if let`, which also drops
  the `collapsible_match` exception.
* `component_to_ron` and `component_to_hash` release the type-registry read
  guard before the work that does not need it.
* The deliberate casts in `Mesh::to_rerun` get an `#[expect]` with a reason.
* The Bevy examples get file-level `#[expect]`s, so they stay close to the
  upstream sources they were copied from.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@emilk

emilk commented Aug 18, 2026

Copy link
Copy Markdown
Member

CI should be fixed by

This was referenced Aug 18, 2026
…5-bevy-0.19

Brings in the MSRV bump, the cargo-cranky removal in favor of workspace lints,
and the cargo-deny fixes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	deny.toml
#	examples/alien_cake_addict.rs
#	examples/breakout/main.rs
#	src/conversions.rs
#	src/default_loggers.rs
#	src/entity_path.rs
#	src/rerun_logger.rs
#	src/sync.rs
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.

4 participants