bytecodealliance / bytecodealliance/wit-bindgen
How to use gc to manage resources
Open
- Dominant language
- Rust
- Stars
- 1.5k
- Forks
- 286
- Avg merge
- 6h 32m
- Merged PRs (30d)
- 19
Description
I have a handle to a huge tensor (`GTensor`) on the gpu, the size is u64(ptr) + u64(len).
I hope that all other operations will use its reference (`GView`), and if there is no reference, the resource will be recycled by js side gc.
Should I define `GTensor` as `resource` and `GView` as `record`?
I'm not sure about the implementation of wasm-gc, and how to reclaim this resource at runtime.
Is there a best practice for gc resources?
Or the gc proposal has not been implemented, and I should wrap it internally as `Rc>`?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.