bytecodealliance / bytecodealliance/component-docs

Remove command component from Calculator Tutorial

Đang mở
#236 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
137
Fork
88
Merge trung bình
5 ngày 12 giờ
Pull request đã merge (30 ngày)
4

Mô tả

Instead of composing with a command component, the `calculator` world could export `wasi:cli/run` itself:
```
package docs:calculator@0.1.0;

interface calculate {
enum op {
add,
}
eval-expression: func(op: op, x: u32, y: u32) -> u32;
}

world calculator {
export calculate;
import docs:adder/add@0.1.0;
}

world app {
import calculate;
export wasi:cli/run; <--- suggested addition
}
```

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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.