wit-bindgen-cpp 0.62: async exports are unimplemented — generated header omits the async export declarations
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- A WIT world with two exported interfaces: one whose functions are
async func(e.g.definitions/executereturningexpected<_, error>), one with a synchronous function. wit-bindgen cpp <wit> --world <world> --out-dir gen(0.62.0).- 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]).
- Langage dominant
- Rust
- Étoiles
- 1.5k
- Forks
- 306
- Merge moyen
- 1 j 4 h
- PR mergées (30 j)
- 21
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de bytecodealliance/wit-bindgen
-
gen-rust
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
bytecodealliance/wit-bindgen#1791 ·
Les mainteneurs répondent en général sous 1 jour
-
gen-rust
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
bytecodealliance/wit-bindgen#1790 ·
Les mainteneurs répondent en général sous 1 jour
-
Document build.rs approachOuvertegen-rust
Difficulté 3/5 Une demi-journée Accessibilité débutants 55/100
bytecodealliance/wit-bindgen#1787 ·
Les mainteneurs répondent en général sous 1 jour
-
gen-c#
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
bytecodealliance/wit-bindgen#1759 ·
Les mainteneurs répondent en général sous 1 jour
-
Async exports never free the block of indirect parametersPeut-être pris @Aditya1404Sal l’a pris il y a 37 jours. Ouverteasync
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
bytecodealliance/wit-bindgen#1757 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de bytecodealliance/wit-bindgen
Issues similaires
-
lane:collections todo:ticket
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 3 jours
-
bugfix
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
storytold/designcraft#3662 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
good first issue tooling
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Nixitov/Riptide-Native#521 ·
Les mainteneurs répondent en général sous 1 jour