wit-bindgen-cpp 0.62: async exports are unimplemented — generated header omits the async export declarations
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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]).
- Vorherrschende Sprache
- Rust
- Sterne
- 1.5k
- Forks
- 306
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 21
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus bytecodealliance/wit-bindgen
-
gen-rust
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
bytecodealliance/wit-bindgen#1791 ·
Maintainer antworten meist innerhalb von 1 Tag
-
gen-rust
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
bytecodealliance/wit-bindgen#1790 ·
Maintainer antworten meist innerhalb von 1 Tag
-
gen-rust
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
bytecodealliance/wit-bindgen#1787 ·
Maintainer antworten meist innerhalb von 1 Tag
-
gen-c#
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
bytecodealliance/wit-bindgen#1759 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Async exports never free the block of indirect parametersEvtl. vergeben @Aditya1404Sal hat das vor 37 Tagen übernommen. Offenasync
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
bytecodealliance/wit-bindgen#1757 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in bytecodealliance/wit-bindgen
Ähnliche Issues
-
lane:collections todo:ticket
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 3 Tagen
-
bugfix
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
storytold/designcraft#3662 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue tooling
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Nixitov/Riptide-Native#521 ·
Maintainer antworten meist innerhalb von 1 Tag