WebAssembly / WebAssembly/wasi-webgpu

Using `windowing-systems-graphics-apis` worlds instead of graphics-context

Open
#55 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
220
Forks
15
PR merge metrics
No merged PRs in 30d

Description

In a recent conversation I had with @lukewagner he proposed a different solution to the problem of connecting windowing-systems with graphics-apis.
His idea was to have a special world for each connection type, e.g. a surface-webgpu world, and a surface-frame-buffer world.
At the time I dismissed the idea because it would mean we'd need windowing-system types * graphics-api types worlds, which could grow quickly.

However, while I'm still concerned about the explosion of worlds, I think this approach would provide two advantages (besides just being simpler for developers - which Luke mentioned)

  1. It would allow us to have specific options/parameters for each connection type. E.g. we could put a GPUCanvasContext there (perhaps with a different name), which would be closer to the WebGPU spec.
  2. It won't require us to lock in decisions in graphics-context (e.g. managed swapchain, or providing a present method).

Given all these advantages, I'm starting to think that it's a better approach after all.

@seanisom thoughts?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed surface-webgpu and surface-frame-buffer worlds and compare them with the graphics-context approach described in the issue. Consider how each connection type would expose options such as GPUCanvasContext without locking in swapchain or present decisions. Done requires a documented architectural decision, but the issue does not identify implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.