Allow path expansion/modification for the `deps` directory in `generate!`

オープン
#1,675 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #1723 @celarye による — マージされずにクローズ

評価

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

調査の方向性

まず、wit_bindgen::generate!、wasmtime::bindgen!、wasmtime::Config が WIT パッケージをその deps ディレクトリにどのように関連付けているかを追跡します。既存のパス処理の動作を issue の例と照らし合わせて確認し、そのうえで、明示的に指定された deps パスをどのように表現すべきかを判断します。root パッケージの兄弟ディレクトリの外側にある依存関係ツリーを、Windows を含めて symlinks なしでリンクできれば完了です。

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

説明

gen-rust
Feature

allow wit_bindgen::generate! (and wasmtime::bindgen!) to link a dependency tree that is not a sibling path to the root WIT package to be generated:

bindgen!({
    world: "foo",
    path: "other/path/to/wit",
    deps: "path/to/foo/dir/deps", // behaves as "other/path/to/wit/dir"
    // ...
});
Benefit

This would allow aggregation of dependency trees for multiple packages that share different directories

Implementation

Likely u directory association inside of bindgen! wasmtime::Config

Alternatives

Symlinking, this is not supported on windows 😢

主要言語
Rust
スター
1.5k
フォーク
306
平均マージ
1日 4時間
マージ済み PR(30日)
21

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bytecodealliance/wit-bindgen のほかの issue

bytecodealliance/wit-bindgen の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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