[Rust] custom derive for struct/enum with resource types
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず Rust の custom-derive の処理と、リソース型が additional-derive-ignore とどのように相互作用するかを追跡します。Issue にある 3 つのアプローチを比較し、どの動作を選択すべきか、またリソース型を含む struct と enum でそれをどのように検証できるかを判断します。
索引モデルが issue の本文から書いたものです。
説明
Currently custom derive applies to all struct and enum definitions. Understandably, the resource struct doesn't use the custom derive. The problem is that when the struct/enum type contains a resource type, the derive trait will not work. We can use additional-derive-ignore to opt-out such types individually, but that's not very convenient.
I can see several ways to fix it, but not sure which one makes more sense:
- Only apply custom derive to struct and enum that doesn't contain resource types. This is equivalent to manually opt-out those types with
additional-derive-ignore. - Apply the custom derive to resource struct as well. But many traits don't make sense for resource types.
- Have a flag to define custom derive for individual types, similar to
with, we can have awith-derive.
Maybe in the short term, we can apply the first option, which is also easy to implement?
- 主要言語
- Rust
- スター
- 1.5k
- フォーク
- 306
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/wit-bindgen のほかの issue
-
gen-rust
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
bytecodealliance/wit-bindgen#1791 ·
メンテナーはふだん 1 日以内に返信
-
gen-rust
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
bytecodealliance/wit-bindgen#1790 ·
メンテナーはふだん 1 日以内に返信
-
gen-rust
難易度 3/5 半日 初心者へのやさしさ 55/100
bytecodealliance/wit-bindgen#1787 ·
メンテナーはふだん 1 日以内に返信
-
gen-c#
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
bytecodealliance/wit-bindgen#1759 ·
メンテナーはふだん 1 日以内に返信
-
Async exports never free the block of indirect parameters対応中かも @Aditya1404Sal が 37 日前に担当しました。 オープンasync
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
bytecodealliance/wit-bindgen#1757 ·
メンテナーはふだん 1 日以内に返信
bytecodealliance/wit-bindgen の issue をすべて見る
似ている issue
-
lane:collections todo:ticket
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 3 日以内に返信
-
bugfix
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
storytold/designcraft#3662 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
good first issue tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Nixitov/Riptide-Native#521 ·
メンテナーはふだん 1 日以内に返信