arik-so / arik-so/ldk-parser

Fix cloneability handling

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

When `clone()` is available, do the following:

- [x] Add `danglingClone()` method
- [x] Make sure `danglingClone()` is called wherever necessary
- [x] If cloning is possible but not necessary, make sure either `dangle()` or `anchor` or both are used as necessary
- [x] If cloning is **not** available, but appears to have been necessary, make sure the warning label is added
- [ ] When instantiating a struct with an _is_owned_ field in Swift, make sure it's not owned until Swift is ready to free it
- [x] Similarly, when receiving a struct with an _is_owned_ field from a Rust method call, figure out how to handle it and whether to set it to false or whatever

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Swift struct initialization and Rust method-call handling for structs with an `_is_owned` field; the issue does not name files or tests. Determine when Swift is ready to free the struct and how received structs should handle ownership. Done means the remaining unchecked item is resolved and ownership is handled safely in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, swift
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.