bytecodealliance / bytecodealliance/ComponentizeJS
Auto-drop borrows
- Dominant language
- Rust
- Stars
- 391
- Forks
- 53
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 1
Description
In https://github.com/bytecodealliance/jco/pull/262, we now validate all borrows properly.
The need to call `resource[Symbol.dispose]()` explicitly for all functions that take resources seems unnecessary though.
Rather, the implementation should always auto-drop borrows at the bindgen level without requiring the JS user to have to do that explicitly. Explicitly drop calls should instead act as early drops if desired.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading PR 262 and the bindgen implementation it changed, since the issue names no files or tests. Trace how borrowed resources are validated and dropped, then define completion as automatic borrow drops for resource-taking functions while explicit Symbol.dispose() calls remain available as early drops.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust, wasm
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100