wit-bindgen-cpp 0.62: async exports are unimplemented — generated header omits the async export declarations

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

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

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

評価

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

調査の方向性

Start in wit-bindgen-cpp-0.62.0/src/lib.rs and inspect the seven todo!() sites for FunctionKind::AsyncFreestanding and AbiVariant::GuestExportAsync. Reproduce with the async and synchronous WIT world using wit-bindgen cpp, then verify that the generated header includes async export declarations and that the guest's out-of-line definitions compile.

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

説明

gen-cpp

The C++ generator has no implementation for the component-model async ABI: wit-bindgen-cpp-0.62.0/src/lib.rs carries todo!() on the async paths (FunctionKind::AsyncFreestanding, AbiVariant::GuestExportAsync — 7 sites in 0.62.0).

Consequence for a guest that exports async func: the generated header silently omits those declarations, so a user's out-of-line definitions do not compile:

src/upper.cpp:61:39: error: out-of-line definition of 'Definitions' does not match any declaration in namespace 'exports::tau::extension::tools'
src/upper.cpp:71:26: error: out-of-line definition of 'Execute' does not match any declaration in namespace 'exports::tau::extension::tools'

The same WIT generates correctly for the synchronous interface in the same world (the probes interface, a plain sync func), and the type definitions are generated — only the async export declarations are missing. So this is a generator gap, not a WIT-shape problem.

Reproduction

  1. A WIT world with two exported interfaces: one whose functions are async func (e.g. definitions / execute returning expected<_, error>), one with a synchronous function.
  2. wit-bindgen cpp <wit> --world <world> --out-dir gen (0.62.0).
  3. Compile a user file that defines the async exports — the compiler reports “does not match any declaration”.

Environment: wit-bindgen 0.62.0; clang++; wasm32 target; the guest in question is a component-model component exercising the async export ABI (async func exports, stream/future in signatures).

Impact: a C++ guest cannot be authored for any component whose exports are async — we are blocked on the C++ cell of our language matrix (C and Python build), and there is no shim-level workaround because what is missing is declarations, not standard-library support.

Happy to provide the minimal WIT + generated header if useful. Reported from https://github.com/gqf2008/tau (0.7.0 contract tau:[email protected]).

主要言語
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 を短くまとめたダイジェスト。