componetize command does not export wasi:http/incoming-handler

オープン
#282 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, wasm

調査の方向性

test.js と world.wit の再現から始め、示されている jco componentize コマンドを実行します。生成されたコンポーネントの WIT インポートとエクスポートを調査し、wasi:http/incoming-handler が存在しない理由に焦点を当てます。文書化された HTTP サーバーのケースで、期待される incoming-handler インターフェースを公開するコンポーネントが生成されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

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

Image

would suggest....

主要言語
Rust
スター
392
フォーク
54
平均マージ
2日 18時間
マージ済み PR(30日)
3

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bytecodealliance/ComponentizeJS のほかの issue

bytecodealliance/ComponentizeJS の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。