bytecodealliance / bytecodealliance/ComponentizeJS

Newer versions of wasi:http/incoming-handler are tied to version in StarlingMonkey

未关闭
#313 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug feature/fetch-event feature/wasi project/starlingmonkey
主要语言
Rust
星标
391
派生
53
平均合并
3 天 5 小时
30 天内合并 PR
1

描述

At present, `componentize-js` will error when users attempt to use a version of `wasi:http/incoming-handler` that is not being used by StarlingMonkey underneath.

```
(jco componentize) ComponentError: failed to encode a component from module
$failed to decode world from module

Caused by:
0: module was not valid
1: failed to find export of interface `wasi:http/incoming-handler@0.2.8` function `handle`
at componentNew (file:///path/to/project/node_modules/.pnpm/@bytecodealliance+jco@1.15.1/node_modules/@bytecodealliance/jco/obj/wasm-tools.js:4659:11)
at componentNew (file:///path/to/project/node_modules/.pnpm/@bytecodealliance+jco@1.15.1/node_modules/@bytecodealliance/jco/src/api.js:48:12)
at async componentize (file:///path/to/project/node_modules/.pnpm/@bytecodealliance+componentize-js@0.19.2/node_modules/@bytecodealliance/componentize-js/src/componentize.js:342:5)
at async componentize (file:///path/to/project/node_modules/.pnpm/@bytecodealliance+jco@1.15.1/node_modules/@bytecodealliance/jco/src/cmd/componentize.js:25:24)
at async file:///path/to/project/node_modules/.pnpm/@bytecodealliance+jco@1.15.1/node_modules/@bytecodealliance/jco/src/jco.js:485:17
```

It would be ideal if people could easily update their WASI versions just like if they were using `wasi:http` manually, but obviously this becomes a problem of trying to support a matrix of wasi:http versions with the version of StarlingMonkey that is used.

See also #282

贡献指南

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

调研方向

首先复现 wasi:http/incoming-handler@0.2.8 的 componentize 失败,然后阅读 componentize.js 以及 trace 中显示的相关 src/api.js 和 jco.js 入口点。定义受支持的 WASI 版本如何与 StarlingMonkey 版本交互,并验证所选版本可以在不出现 missing-export 错误的情况下进行 componentize。

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

评估

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

把新 issue 发到你的邮箱

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