Parent
- Program: ENG2 — GoudEngine v2 Rebuild (see the pinned master tracking issue)
- Phase / Milestone: Phase 9 — Authoring, Platforms, Examples & Polish (
eng2-p9-authoring)
- Batch / Group: Batch 9.1 — Platforms & tooling (4 groups, parallel), Group C
- Runbook spec:
docs/src/runbook/phases/phase-9.md (committed with the roadmap)
Summary
Turn the console (Vulkan/Xbox GDK) targets into an explicit experimental feature-gate, deduplicate the three byte-near-identical 323-line backend-init copies, and record the console-support strategy as a decision.
Architecture Context
Layer: Layer 2 (Libs) — libs/graphics/backend/ platform-init modules. (see tools/lint_layers.rs — downward-only deps).
Modules/types touched:
goud_engine/src/libs/graphics/backend/switch_vulkan_platform.rs:52-57 — honest PoC stub; gate behind an explicit experimental-console feature.
goud_engine/src/libs/graphics/backend/xbox_gdk_platform.rs:55-56 — honest PoC stub; same treatment.
- The three wgpu backend-init files (byte-near-identical, ~323 lines each) — extract shared init logic into one function/module the platform-specific files call into.
Boundary constraints (only those that apply):
- Raw GPU calls stay in
libs/graphics/backend/ — no wgpu::/gl:: outside it.
- Console-specific code stays behind the new
experimental-console feature gate; it must not be part of any default build.
Pattern to follow: Existing default-feature wgpu backend init (the non-console file in the same trio) is the canonical init sequence the shared-extraction targets; console files call into it plus their platform-specific delta.
Scope
Acceptance Criteria
Breaking Change & Throne Follow-up
None — console code is already non-functional PoC stubs; feature-gating and dedup do not change any shipped default-build behavior.
Blocked By
None.
Files Likely Touched
- New/Modified/Generated:
goud_engine/src/libs/graphics/backend/switch_vulkan_platform.rs, goud_engine/src/libs/graphics/backend/xbox_gdk_platform.rs, the third wgpu backend-init file, Cargo.toml (new experimental-console feature), .github/workflows/*.yml (new typecheck lane), a strategy decision doc
Agent Notes
- Confirmed by direct read:
switch_vulkan_platform.rs:52-57 and xbox_gdk_platform.rs:55-56 are honest PoC stubs — not disguised as working console support. The three wgpu backend-init files are byte-near-identical at ~323 lines each; this issue's dedup target is that shared block, not a rewrite of the init sequence itself.
- This issue is explicitly about honesty and maintainability (experimental-gate + dedup + a recorded decision), not about making console targets functionally complete — do not scope-creep into real console bring-up.
Verification
cargo check && cargo fmt --all -- --check && cargo clippy -- -D warnings
cargo test
./codegen.sh && git diff --exit-code
Parent
eng2-p9-authoring)docs/src/runbook/phases/phase-9.md(committed with the roadmap)Summary
Turn the console (Vulkan/Xbox GDK) targets into an explicit experimental feature-gate, deduplicate the three byte-near-identical 323-line backend-init copies, and record the console-support strategy as a decision.
Architecture Context
Layer: Layer 2 (Libs) —
libs/graphics/backend/platform-init modules. (seetools/lint_layers.rs— downward-only deps).Modules/types touched:
goud_engine/src/libs/graphics/backend/switch_vulkan_platform.rs:52-57— honest PoC stub; gate behind an explicitexperimental-consolefeature.goud_engine/src/libs/graphics/backend/xbox_gdk_platform.rs:55-56— honest PoC stub; same treatment.Boundary constraints (only those that apply):
libs/graphics/backend/— nowgpu::/gl::outside it.experimental-consolefeature gate; it must not be part of any default build.Pattern to follow: Existing default-feature wgpu backend init (the non-console file in the same trio) is the canonical init sequence the shared-extraction targets; console files call into it plus their platform-specific delta.
Scope
experimental-consoleCargo feature (off by default).experimental-consolefeature (build/typecheck, not full test, given no console hardware in CI).goud_engine/tests/spec/+ unit/isolation coverage for the new code paths..agents/rules/*ordocs/src/*.Acceptance Criteria
experimental-consolefeature exists, is off by default, and has a required CI typecheck lane.cargo check && cargo fmt --all -- --check && cargo clippy -- -D warningsclean;cargo testgreen;./codegen.sh && git diff --exit-code(drift gate)Breaking Change & Throne Follow-up
None — console code is already non-functional PoC stubs; feature-gating and dedup do not change any shipped default-build behavior.
Blocked By
None.
Files Likely Touched
goud_engine/src/libs/graphics/backend/switch_vulkan_platform.rs,goud_engine/src/libs/graphics/backend/xbox_gdk_platform.rs, the third wgpu backend-init file,Cargo.toml(newexperimental-consolefeature),.github/workflows/*.yml(new typecheck lane), a strategy decision docAgent Notes
switch_vulkan_platform.rs:52-57andxbox_gdk_platform.rs:55-56are honest PoC stubs — not disguised as working console support. The three wgpu backend-init files are byte-near-identical at ~323 lines each; this issue's dedup target is that shared block, not a rewrite of the init sequence itself.Verification