Skip to content

Simplify C++ binding definitions - #11936

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:refactor-cpp-api
Nov 5, 2025
Merged

alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:refactor-cpp-api

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

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.

@alexcrichton
alexcrichton requested a review from a team as a code owner October 24, 2025 18:02
@alexcrichton
alexcrichton requested review from pchickey and removed request for a team October 24, 2025 18:02
@github-actions github-actions Bot added the wasmtime:c-api Issues pertaining to the C API. label Oct 24, 2025
@alexcrichton

Copy link
Copy Markdown
Member Author

ping @pchickey, mind taking a look at this?

@pchickey pchickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I lost this one

@alexcrichton
alexcrichton added this pull request to the merge queue Nov 4, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2025
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.
@alexcrichton
alexcrichton added this pull request to the merge queue Nov 4, 2025
auto-merge was automatically disabled November 4, 2025 23:56

Pull Request is not mergeable

Merged via the queue into bytecodealliance:main with commit 311d023 Nov 5, 2025
@alexcrichton
alexcrichton deleted the refactor-cpp-api branch November 5, 2025 00:15
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Nov 5, 2025
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.
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 <[email protected]>

---------

Co-authored-by: Joel Dice <[email protected]>

---------

Co-authored-by: Joel Dice <[email protected]>
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.

2 participants