feat(bsn): Bevy 0.19-rc migration + BSN authoring (buiy_bsn)#70
Merged
Conversation
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>
4867ec9 to
9deedc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Brings real Bevy Scene Notation (
bsn!) authoring to Buiy. BSN's baseline landed upstream via PR #23413 (milestoned 0.19, inbevy_scene), so this bumps the workspace Bevy 0.18.1 → 0.19.0-rc.3 and adds a thinbuiy_bsnauthoring 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.mdThis 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 infollow-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)
BuiyNode: ViewNodeis now a singlebuiy_passsystem in theCore2dschedule (Core2dSystems::EarlyPostProcess). One system = one command encoder = byte-identical to the old singleViewNode(preserves cross-passLoadOp::Loadcomposite loads). Paint order/correctness unchanged.multiview_mask,MipmapFilterMode,immediate_size); ECSReplace→Discard; accesskitTreeUpdate.tree_id.Res→ harnesses init theSkinnedMeshInverseBindposesasset thatMeshPlugin(DefaultPlugins) always provides.BSN authoring (
crates/buiy_bsn+ widgets)buiy_bsn: thin prelude re-exportingbsn!/bsn_list!+ spawn ext traits; surfaced viabuiy::bsn/buiy::prelude. Widget-agnostic.Nodenow#[require]s the style decomposition (sync_stylesalready queried it non-optionally — mandatory companions; fixes latent bare-Nodefragility). Widgets requireNode+ companions, sobsn!{ Button }materializes the full contract; existing constructors unchanged.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.examples/hello_bsn: a real Buiy UI authored viabsn!, 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: ✅buiy_coreGPU--ignoredlane (render-rewrite correctness — the dev gate): ✅ on a real adapter (render_compositor_gpu, golden, msaa, atlas). Button reftest: ✅.buiy_verifylavapipe golden (rect-rounded/golden_sdf_corner) diverges bymax_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 infollow-ups.mdfor CI re-bless on the pinned Mesa; not blessed on a dev host (would break CI).🤖 Generated with Claude Code