rust-windowing / rust-windowing/softbuffer

Handle zero-sized buffers internally

Open
#238 17 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The NonZeroU32 in our public API is ugly IMO. Is there a reason why we avoid resizing and rendering when the sizes are 0? Does it crash on some backends? Could we instead make it be a no-op?

See also discussion in https://github.com/rust-windowing/softbuffer/pull/236#discussion_r1740169764.

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 NonZeroU32 public API and the discussion linked in PR #236, then trace how resizing and rendering handle zero sizes across the supported backends. Done means the API no longer requires callers to avoid zero-sized buffers, with backend behavior and no-op semantics established and covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, computer-graphics
Issue type
Feature
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.