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

Đang mở
#282 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, wasm
Lĩnh vực
build-system, devtools

Hướng nghiên cứu

Bắt đầu với bản tái hiện trong test.js và world.wit rồi chạy lệnh jco componentize được nêu. Kiểm tra các import và export WIT của component được tạo, tập trung vào lý do wasi:http/incoming-handler bị thiếu. Được xem là hoàn tất khi trường hợp máy chủ HTTP được ghi lại tạo ra một component cung cấp interface incoming-handler như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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....

Ngôn ngữ chính
Rust
Star
392
Fork
54
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bytecodealliance/ComponentizeJS

Tất cả issue của bytecodealliance/ComponentizeJS

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.