prometeu-runtime/discussion/workflow/plans/PLN-0106-migrate-desktop-host-to-platform-services.md

2.2 KiB

id ticket title status created completed ref_decisions tags
PLN-0106 real-render-worker-establishment Migrate Desktop Host to Platform Services open 2026-06-06
DEC-0032
host
desktop
platform

Objective

Move the desktop host from directly exposing prometeu_drivers::Hardware as the runtime bridge to owning a platform implementation.

Background

The host currently creates Hardware::new() and passes it into firmware/runtime paths. DEC-0032 requires hosts to implement platform services, not to expose a monolithic bridge.

Scope

Included

  • Introduce desktop/local platform ownership in the host.
  • Replace host usage of Hardware::W/H with platform display constants or framebuffer descriptor.
  • Keep the same visual/audio/input behavior.

Excluded

  • Do not implement render worker thread.
  • Do not change windowing library or presentation policy.

Execution Steps

Step 1 - Add host platform field

What: Host runner owns a platform implementation rather than raw Hardware. How: Wrap current local driver implementation behind platform facades. File(s): crates/host/prometeu-host-desktop-winit/src/runner.rs.

Step 2 - Replace direct hardware constants

What: Stop reading Hardware::W/H directly in host rendering/input. How: Use a framebuffer/display descriptor exposed by platform/render service. File(s): crates/host/prometeu-host-desktop-winit/src/runner.rs, input.rs.

Step 3 - Update debugger host setup

What: Debugger paths instantiate platform fixture/implementation. How: Replace Hardware::new() in debugger setup. File(s): crates/host/prometeu-host-desktop-winit/src/debugger.rs.

Test Requirements

Unit Tests

  • Host crate tests compile.

Integration Tests

  • cargo test -p prometeu-host-desktop-winit.

Manual Verification

  • Desktop host still runs stress cartridge.

Acceptance Criteria

  • Desktop host owns platform services.
  • Host no longer treats Hardware as runtime bridge.
  • Display dimensions come from platform/render descriptor.

Dependencies

  • PLN-0105.

Risks

  • Desktop host mixes runtime and window concerns. Keep worker threading out of this plan.