bytecodealliance / bytecodealliance/ComponentizeJS
componetize command does not export wasi:http/incoming-handler
- 主要语言
- Rust
- 星标
- 391
- 派生
- 53
- 平均合并
- 3 天 5 小时
- 30 天内合并 PR
- 1
描述
I might be just doing something wrong, but here's a simple repro.
test.js
```
addEventListener('fetch', (evt) => {
console.log('fetch-event style request handling');
});
```
world.wit
its empty because all it wants to do is be an http server... (if I went wrong its probably here, I assume we don't have to manually export wasi:http/incoming-handler in our world)
```
package fetch:test;
world ui {
}
```
with jco 1.13
jco componetize handle.js --wit world.wit --out handle.wasm
which yields what I would expect, sands that ability to actually accept an incoing request.
all the other package definitions have been omitted, this is was I see when inspecting the component with the wit vs code extension.
```
package root:component;
world root {
import wasi:io/error@0.2.3;
import wasi:io/poll@0.2.3;
import wasi:io/streams@0.2.3;
import wasi:cli/stdin@0.2.3;
import wasi:cli/stdout@0.2.3;
import wasi:cli/stderr@0.2.3;
import wasi:cli/terminal-input@0.2.3;
import wasi:cli/terminal-output@0.2.3;
import wasi:cli/terminal-stdin@0.2.3;
import wasi:cli/terminal-stdout@0.2.3;
import wasi:cli/terminal-stderr@0.2.3;
import wasi:clocks/monotonic-clock@0.2.3;
import wasi:clocks/wall-clock@0.2.3;
import wasi:filesystem/types@0.2.3;
import wasi:filesystem/preopens@0.2.3;
import wasi:random/random@0.2.3;
import wasi:http/types@0.2.3;
import wasi:http/outgoing-handler@0.2.3;
}
```
most importantly, the component doesn't automatically export wasi:http/outgoing-handler like the big fat
would suggest....
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 test.js 和 world.wit 中的复现开始,并运行所示的 jco componentize 命令。检查生成组件的 WIT 导入和导出,重点关注 wasi:http/incoming-handler 缺失的原因。当文档中的 HTTP 服务器案例生成一个公开预期 incoming-handler 接口的组件时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, wasm
- 领域
- build-system, devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100