microsoft / microsoft/windows-rs
`windows-bindgen` should generate more specific `Result<T, E>` types
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 12.8k
- Forks
- 665
- Avg merge
- 7h 9m
- Merged PRs (30d)
- 70
Description
Rather than folding all error types into the `windows_result::Error` type, APIs can more specifically return `Result`, `Result`, and so on. This would avoid the overhead that necessitated #3126 and allow simple pattern matching for error handling. The reasoning around the Windows-specific `Result` is that it additionally carries any `IErrorInfo` that may have been associated with the calling thread. This turns out to be used by very few APIs but can still be supported as needed through conversion.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the windows-bindgen generation path and inspect windows_result::Error and the changes discussed in #3126. Trace how APIs currently select Result and identify which generated APIs expose HRESULT or NTSTATUS. Done means supported APIs use specific error types while APIs needing IErrorInfo still convert to the Windows-specific Error type, with coverage for the affected generated bindings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100