rust-windowing / rust-windowing/softbuffer

Remove ?Sized bounds or add CI test that they work

Open
#195 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
506
Forks
85
PR merge metrics
No merged PRs in 30d

Description

https://github.com/rust-windowing/softbuffer/pull/132 added trait bonds with ?Sized.

Context<dyn HasDisplayHandle> was mentioned there, but if you try to specify that type anywhere, it errors because Context and ContextDispatch do not have D: ?Sized bounds. So the public API doesn't actually allow that.

Adding those bounds is easy, but is there a way to construct a Context<dyn HasDisplayHandle>?

If ?Sized is useful, we should make sure it works and have a test that it continues working on all platforms. Otherwise, it can be removed, which may make other refactoring easier.

CC @notgull

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 by inspecting the definitions of Context and ContextDispatch and the changes from pull request 132. Check whether Context can be constructed and exercised across supported platforms. Done means either making the ?Sized API work with CI coverage or removing the bounds and confirming the refactoring remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, computer-graphics
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.