Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature idea: short hand commands for common composition scenarios

Đang mở
#53 0 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
rust, wasm
Lĩnh vực
cli, devtools

Hướng nghiên cứu

Bắt đầu với script wac được đề xuất và cú pháp lệnh wac plug --plug ... --into .... Xác định liệu các import của plug được kế thừa hay được điều khiển bằng một flag, sau đó xác nhận rằng hành vi và giao diện của dạng viết tắt đã được thống nhất và ghi chép.

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

Mô tả

The wac language is a powerful tool that enables essentially any composition scenario. However, there are some common composition scenarios for which we could provide short hand commands to accomplish without the need for a full script.

Initial Proposal

My initial proposal for the first short hand command would be for a "plug" composition scenario where there are two components, one of which exports a function that mirrors an import of the second component. The first component essentially "plugs" the import hole in the second.

Another way to think about this is as a shorthand for the following wac script:

package example:composition;

let plug = new $PLUG {};

let socket = new $SOCKET {
  $SOCKET_IMPORT: plug.$PLUG_EXPORT,
};

export socket...;

The command would look like the following:

wac plug --plug $PLUG#$PLUG_EXPORT --into $SOCKET#$SOCKET_IMPORT
Unanswered questions

The above example assume that the plug has no imports. We could either provide a flag that allows for the resulting component to inherit the imports of the plug or do this be default. I'm not sure how I feel about it either way.

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

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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/wac

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

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.