bytecodealliance / bytecodealliance/wit-bindgen

Consider splitting configuration of foreign types into a new `generate!` macro config key

オープン
#992 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
1.5k
フォーク
286
平均マージ
6時間 32分
マージ済み PR(30日)
19

説明

In https://github.com/bytecodealliance/wit-bindgen/pull/972 the default for whether bindings would be generated for foreign (i.e., not in the same package as the target world) types was flipped from being generated by default to not. Users could still opt-into generating code for foreign types by using the `generate` keyword.

The use of a special keyword, however, might not be the most discoverable. Instead we may wish to introduce a new key in the `generate!` macro.

In short the following...

```rust
with: {
"wasi:io/poll": wasi::io::poll,
"some:package/my-interface": generate,
},
```

...would become the following...

```rust
with: {
"wasi:io/poll": wasi::io::poll,
},
generate: [
"some:package/my-interface"
]
```

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

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

調査の方向性

issue に記載されている generate! マクロの設定から始め、既存の with キーが外部型に対する generate 値をどのように処理しているかを追ってください。現在の設定と提案された設定を比較し、新しい generate キーが同じオプトイン動作をサポートする一方で、with はマッピング用に残ることを確認してください。

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

評価

技術スタック
rust
領域
tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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