Removing IsValid
- Dominant language
- Rust
- Stars
- 62
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Hi, first off I want to thank you for this library. It's made my life so much easier.
There are definitely ways to cause UB in safe Rust with this library. The main one I ran into today was needing to call `is_valid` before calling any other methods on some types.
I think it would be more "rust-y" if `maybe_wrap` was the default and `wrap` was unsafe and only used when the check is too expensive for performance reasons and we already knew it was valid for another reason. This would mean if I had a `SBFoo` I'd know it's already been checked for validity.
I'm not up for making this change to everything at once but I'm open to doing this for some types as I work on my own project, if that sounds useful to you?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Rust definitions and uses of `is_valid`, `maybe_wrap`, and `wrap` across the LLDB bindings. Determine which types rely on the current validity checks and whether the proposed API change can be applied consistently. Done would require an agreed scope and corresponding updates across the affected types, with the existing test suite still passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100