Skip to content

feat(platform): expose owned surface-target seam for renderer attachment #23

Closed

Description

@Xuepoo

Per ADR-0004 note that the GPU rendering strategy touches only bitty-render and bitty-platform, and the CTX-0015 deferral of the GPU context seam.

Scope

  • Owned SurfaceTarget abstraction in bitty-platform: WindowHandle hands out a platform window surface handle suitable for wgpu surface creation WITHOUT exposing winit/raw-window-handle types publicly
  • If raw-window-handle types are unavoidable at the boundary: pin+re-export the exact version and document why (expected, since wgpu 25 consumes raw-window-handle 0.6)
  • DPI-size refresh hook (logical size -> physical extent at current scale) on the window surface path
  • Resize event -> surface-extent flow documented on PlatformEvent/WindowEventKind docs

Constraints

  • Headless-friendly: pure logic unit-tested per existing crate seam style; display-dependent parts cfg/feature gated (gui-tests)
  • No changes outside crates/bitty-platform/** except a minimal manifest edit if adding the raw-window-handle dep (+ Cargo.lock)
  • Zero unsafe (workspace denies unsafe_code; crate forbids it)

Linked task: CTX-0017. Gates: just check green.

Activity

  1. added a commit that references this issue on Aug 26, 2026
    0d1d384
  2. added
    feat
    area:platform
    area:render
    on Aug 29, 2026
  3. added this to the v0.0.1 milestone on Aug 29, 2026
  4. added
    P0
    on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0area:platformarea:renderfeat

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions