bytecodealliance / bytecodealliance/ComponentizeJS

Auto-drop borrows

未关闭
#72 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
391
派生
53
平均合并
3 天 5 小时
30 天内合并 PR
1

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先阅读 PR 262 以及它修改的 bindgen 实现,因为该 issue 没有指出任何文件或测试。跟踪借用资源如何被验证和丢弃,然后将完成定义为对获取资源的函数自动丢弃借用,同时显式的 Symbol.dispose() 调用仍可作为提前丢弃的方式使用。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, rust, wasm
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。