Skip to content

feat(bsn): Bevy 0.19-rc migration + BSN authoring (buiy_bsn)#70

Merged
intendednull merged 1 commit into
mainfrom
worktree-bsn-support
Jun 19, 2026
Merged

feat(bsn): Bevy 0.19-rc migration + BSN authoring (buiy_bsn)#70
intendednull merged 1 commit into
mainfrom
worktree-bsn-support

Conversation

@intendednull

Copy link
Copy Markdown
Owner

What

Brings real Bevy Scene Notation (bsn!) authoring to Buiy. BSN's baseline landed upstream via PR #23413 (milestoned 0.19, in bevy_scene), so this bumps the workspace Bevy 0.18.1 → 0.19.0-rc.3 and adds a thin buiy_bsn authoring layer.

Spec: docs/specs/2026-06-18-buiy-bsn-integration-design.md · Plan: docs/plans/2026-06-18-bevy-0.19-bsn-migration.md · Research: docs/reports/2026-06-18-bevy-0.19-bsn-migration-research.md

⚠️ Merge note — release-candidate dependency

This pins Bevy 0.19.0-rc.3 (no 0.19 stable exists yet), a scoped, deliberate exception to the rolling-latest-stable policy (foundation architecture §2.9) — bsn! is unreachable on any stable Bevy. The exception closes when 0.19.0 stable ships (tracked in follow-ups.md). This is the reviewer's call to make — flagging the rc pin explicitly.

The migration (Bevy 0.18→0.19, wgpu 27→29, accesskit 0.21→0.24)

  • Render graph removed upstream → the old BuiyNode: ViewNode is now a single buiy_pass system in the Core2d schedule (Core2dSystems::EarlyPostProcess). One system = one command encoder = byte-identical to the old single ViewNode (preserves cross-pass LoadOp::Load composite loads). Paint order/correctness unchanged.
  • wgpu fields (multiview_mask, MipmapFilterMode, immediate_size); ECS ReplaceDiscard; accesskit TreeUpdate.tree_id.
  • 0.19 panics (vs 0.18 skip) on a missing Res → harnesses init the SkinnedMeshInverseBindposes asset that MeshPlugin (DefaultPlugins) always provides.

BSN authoring (crates/buiy_bsn + widgets)

  • buiy_bsn: thin prelude re-exporting bsn!/bsn_list! + spawn ext traits; surfaced via buiy::bsn / buiy::prelude. Widget-agnostic.
  • Node now #[require]s the style decomposition (sync_styles already queried it non-optionally — mandatory companions; fixes latent bare-Node fragility). Widgets require Node + companions, so bsn!{ Button } materializes the full contract; existing constructors unchanged.
  • Widget scene-fns (button/text_input_*) spell styling as field-patches so user patches merge field-wise (the #[require] patch-suppression remedy) — one source of truth with the require initializers.
  • Closed the 8 reflect-registration gaps from the BSN-readiness audit.
  • examples/hello_bsn: a real Buiy UI authored via bsn!, gated by a Tier-1 layout snapshot (the Save/Cancel width-vs-padding merge proven in the resolved layout).

Verification

  • fmt / clippy -D / doc -D / cargo deny: ✅
  • Headless suites: ✅ across all crates (buiy_core 994, widgets, bsn, meta, verify 170, hello_bsn, workspace).
  • buiy_core GPU --ignored lane (render-rewrite correctness — the dev gate): ✅ on a real adapter (render_compositor_gpu, golden, msaa, atlas). Button reftest: ✅.
  • Caveat (not a regression): the one zero-tolerance buiy_verify lavapipe golden (rect-rounded/golden_sdf_corner) diverges by max_channel_delta=35 / 0 differing pixels / mssim 0.9995 — a sub-pixel AA delta from the dev-host Mesa 26.0.2 vs CI-pinned Mesa 24.3.4 (the baselines are Mesa-pinned for CI; also naga 27→29). Documented in follow-ups.md for CI re-bless on the pinned Mesa; not blessed on a dev host (would break CI).

🤖 Generated with Claude Code

Bring real Bevy Scene Notation (`bsn!`) authoring to Buiy. BSN's baseline
landed upstream via PR #23413 (milestoned 0.19, in `bevy_scene`), so this
bumps the workspace from Bevy 0.18.1 to 0.19.0-rc.3 — a scoped, documented
exception to the rolling-latest-*stable* policy (closes on 0.19.0 stable).

Migration (Bevy 0.18 → 0.19.0-rc.3, wgpu 27→29, accesskit 0.21→0.24):
- Render graph removed upstream → the old `BuiyNode: ViewNode` becomes a
  single `buiy_pass` system in the `Core2d` schedule
  (`Core2dSystems::EarlyPostProcess`). One system = one command encoder,
  byte-identical to the old single ViewNode (preserves the cross-pass
  `LoadOp::Load` composite loads). Paint order/correctness unchanged.
- wgpu fields: `multiview_mask: None`, `MipmapFilterMode`, `immediate_size`.
- ECS: `Replace`→`Discard`, non-send accessor renames.
- accesskit `TreeUpdate.tree_id`.
- 0.19 now panics (vs 0.18 skip) on a missing `Res`: the hand-rolled GPU
  test harnesses init the sibling `SkinnedMeshInverseBindposes` asset that
  `MeshPlugin` (in DefaultPlugins) always provides.

BSN authoring (`crates/buiy_bsn` + widgets):
- `buiy_bsn`: thin prelude re-exporting `bsn!`/`bsn_list!` + spawn ext traits;
  surfaced via `buiy::bsn` and `buiy::prelude`. Widget-agnostic.
- `Node` now `#[require]`s the style decomposition (`sync_styles` queries it
  non-optionally — these were already mandatory companions; fixes latent
  bare-`Node` fragility). Widgets require `Node` + their companions, so
  `bsn!{ Button }` materializes the full contract; constructors unchanged.
- Widget scene-fns (`button`/`text_input_*` in `buiy_widgets`) spell styling
  as field-patches so user patches MERGE field-wise (the `#[require]`
  patch-suppression remedy). One source of truth with the require initializers.
- Closed the 8 reflect-registration gaps from the BSN-readiness audit.
- `examples/hello_bsn`: a real Buiy UI authored via `bsn!` + a Tier-1 layout
  snapshot gate (the Save/Cancel width-vs-padding merge proven in the layout).

Verified: fmt/clippy(-D)/doc(-D)/cargo-deny green; headless suites green
across all crates; the `buiy_core` GPU `--ignored` lane (render-rewrite
correctness) green on a real adapter; Button reftest green. The one
`buiy_verify` zero-tolerance lavapipe golden that diverges is environmental
(dev-host Mesa 26.0.2 vs CI-pinned Mesa 24.3.4; mssim 0.9995, 0 differing
pixels) — tracked in follow-ups for CI re-bless, not a regression.

Spec: docs/specs/2026-06-18-buiy-bsn-integration-design.md
Plan: docs/plans/2026-06-18-bevy-0.19-bsn-migration.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@intendednull intendednull force-pushed the worktree-bsn-support branch from 4867ec9 to 9deedc5 Compare June 19, 2026 01:45
@intendednull intendednull merged commit 3b3b0ba into main Jun 19, 2026
7 checks passed
@intendednull intendednull deleted the worktree-bsn-support branch June 19, 2026 02:51
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