Skip to content

Fill out type information for components in C API #11937

Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom
alexcrichton:c-api-component-types
Nov 5, 2025
Merged

Fill out type information for components in C API #11937
alexcrichton merged 2 commits intobytecodealliance:mainfrom
alexcrichton:c-api-component-types

Conversation

@alexcrichton
Copy link
Member

I've concluded that I'll want this for wasmtime-py so this fills out
type reflection for various items in the C API. This then additionally
extends the C++ API as well.

Currently this is built on #11936.

Closes #11438

@alexcrichton
Copy link
Member Author

bytecodealliance/wasmtime-py#308 is the integration in Python using all of this, ending up in what I believe is a mostly-complete binding, or at least as much as the C API offers.

@alexcrichton alexcrichton force-pushed the c-api-component-types branch from f95e8d1 to 23b8884 Compare November 5, 2025 00:31
I've concluded that I'll want this for wasmtime-py so this fills out
type reflection for various items in the C API. This then additionally
extends the C++ API as well.

prtest:full
@alexcrichton alexcrichton force-pushed the c-api-component-types branch from 23b8884 to 3d56397 Compare November 5, 2025 00:31
@alexcrichton alexcrichton marked this pull request as ready for review November 5, 2025 00:31
@alexcrichton alexcrichton requested a review from a team as a code owner November 5, 2025 00:31
@alexcrichton alexcrichton requested review from dicej and removed request for a team November 5, 2025 00:31
Co-authored-by: Joel Dice <joel.dice@fermyon.com>
@alexcrichton alexcrichton added this pull request to the merge queue Nov 5, 2025
Merged via the queue into bytecodealliance:main with commit 39ec36c Nov 5, 2025
172 checks passed
@alexcrichton alexcrichton deleted the c-api-component-types branch November 5, 2025 19:20
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Nov 5, 2025
…11937)

* Fill out type information for components in C API

I've concluded that I'll want this for wasmtime-py so this fills out
type reflection for various items in the C API. This then additionally
extends the C++ API as well.

prtest:full

* Update crates/c-api/include/wasmtime/component/types/func.h

Co-authored-by: Joel Dice <joel.dice@fermyon.com>

---------

Co-authored-by: Joel Dice <joel.dice@fermyon.com>
alexcrichton added a commit that referenced this pull request Nov 6, 2025
* Simplify C++ binding definitions (#11936)

This commit adds a shared macro to simplify ownership management in the
C++ API and to additionally have a uniform API across types. This is
inspired by the component model work where I felt like I was
copy/pasting quite a lot and wanted to cut down on that.

* Fill out type information for components in C API  (#11937)

* Fill out type information for components in C API

I've concluded that I'll want this for wasmtime-py so this fills out
type reflection for various items in the C API. This then additionally
extends the C++ API as well.

prtest:full

* Update crates/c-api/include/wasmtime/component/types/func.h

Co-authored-by: Joel Dice <joel.dice@fermyon.com>

---------

Co-authored-by: Joel Dice <joel.dice@fermyon.com>

---------

Co-authored-by: Joel Dice <joel.dice@fermyon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:c-api Issues pertaining to the C API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

c-api: component-model: Getting type of a function

2 participants