Skip to content

Merge wasm_tag type into wasm_functype / clean up C API tag headers#12803

Open
bacek wants to merge 2 commits intobytecodealliance:mainfrom
bacek:wasm-c-api-tag
Open

Merge wasm_tag type into wasm_functype / clean up C API tag headers#12803
bacek wants to merge 2 commits intobytecodealliance:mainfrom
bacek:wasm-c-api-tag

Conversation

@bacek
Copy link
Contributor

@bacek bacek commented Mar 19, 2026

Upstream wasm-c-api was updated to include Tag. This is migration from wasmtime specific to the upstream.

  • Move tag type info into wasm.h alongside other core types instead of a separate wasmtime/tag.h header
  • Remove wasmtime/tag.h (contents merged into wasm.h / wasm.hh)
  • Update extern.hh and tag.hh to reflect new layout
  • Add tag param accessors in func.rs
  • Refactor tag.rs to match updated C API surface
  • Update tag_type.cc tests accordingly

@bacek bacek requested review from a team as code owners March 19, 2026 07:45
@bacek bacek requested review from alexcrichton and removed request for a team March 19, 2026 07:45
@bacek
Copy link
Contributor Author

bacek commented Mar 19, 2026

PR in wasm-c-api WebAssembly/wasm-c-api#197

@github-actions github-actions bot added the wasmtime:c-api Issues pertaining to the C API. label Mar 19, 2026
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue Mar 19, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 19, 2026
- Move tag type info into wasm.h alongside other core types instead of
  a separate wasmtime/tag.h header
- Remove wasmtime/tag.h (contents merged into wasm.h / wasm.hh)
- Update extern.hh and tag.hh to reflect new layout
- Add tag param accessors in func.rs
- Refactor tag.rs to match updated C API surface
- Update tag_type.cc tests accordingly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bacek
Copy link
Contributor Author

bacek commented Mar 20, 2026

@alexcrichton looks like I slightly screwed on upstream PR. Doc build is failing with

/home/bacek/src/wasmtime/crates/c-api/include/wasm.h:258: error: Compound wasm_tagtype_vec_t is not documented. (warning treated as error, aborting now)

@bacek
Copy link
Contributor Author

bacek commented Mar 20, 2026

@alexcrichton looks like I slightly screwed on upstream PR. Doc build is failing with

/home/bacek/src/wasmtime/crates/c-api/include/wasm.h:258: error: Compound wasm_tagtype_vec_t is not documented. (warning treated as error, aborting now)

Nevermind. Found doc-wasm.h. I need to update it.

Add Doxygen documentation for the `wasm_tagtype_t` type and its
associated functions (`wasm_tagtype_new`, `wasm_tagtype_functype`,
vec helpers, and externtype conversion functions). Also document
`WASM_EXTERN_TAG` and the `wasm_tagtype_as_externtype*` /
`wasm_externtype_as_tagtype*` conversion functions.

Fix pre-existing typo: `wasm_name_new_new_uninitialized` ->
`wasm_name_new_uninitialized`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.

2 participants