|
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0 |
|
| #
546f6dbc |
| 12-Mar-2026 |
Vasily Chekalkin <[email protected]> |
c-api: implement wasm_tagtype_t for exception tag types (#10252) (#12763)
* c-api: implement wasm_tagtype_t for exception tag types (#10252)
Implement the C embedder API for WebAssembly exception t
c-api: implement wasm_tagtype_t for exception tag types (#10252) (#12763)
* c-api: implement wasm_tagtype_t for exception tag types (#10252)
Implement the C embedder API for WebAssembly exception tags, resolving the long-standing todo!() in CExternType::new() that caused a Rust panic whenever a module with tag exports had its exports enumerated via the C API (e.g. wasm_module_exports / wasmtime_module_exports).
Changes: - Add wasm_tagtype_t type with wasm_tagtype_new/params/delete/copy and the standard as_externtype / externtype_as_tagtype cast functions - Add WASM_EXTERN_TAG = 4 constant to wasm_externkind_enum in wasm.h - Add CExternType::Tag(CTagType) variant; wire into CExternType::new() and wasm_externtype_kind() - Add wasmtime/types/tag.hh C++ wrapper (TagType / TagType::Ref) - Extend ExternType::Ref variant and ref_from_c() switch in extern.hh - Add TagType tests: construction, module export enumeration (regression for #10252), and wasm_externtype_kind / cast function correctness
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* c-api: move tag type declarations to wasmtime/tag.h
- Revert wasm.h to its vendored upstream state (it must not be modified locally; tag support is not yet in the upstream wasm-c-api spec header) - Add crates/c-api/include/wasmtime/tag.h with wasm_tagtype_t forward declaration, WASM_EXTERN_TAG constant, and all wasm_tagtype_* / wasm_externtype_as_tagtype* function declarations - Include wasmtime/tag.h from wasmtime.h
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* Apply rustfmt and clang-format to tag type implementation
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* Fix Clippy warnings: remove unused imports and dead code
Drop unused `wasm_tagtype_t` import from extern.rs, and remove the `force`/`ty`/`wasm_tagtype_t::new` dead-code paths from tag.rs that were written for future engine-resolution support but are not yet called.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* Redesign tag type API with wasmtime_* prefix per reviewer feedback
- Rename wasm_tagtype_t → wasmtime_tagtype_t and all wasm_tagtype_* functions → wasmtime_tagtype_* to avoid clashing with future wasm.h additions (as requested by alexcrichton) - Constructor now takes wasm_engine_t* + wasm_valkind_t array + count instead of wasm_valtype_vec_t, eliminating the lazy-init complexity - Replace wasm_tagtype_params() (returning a vec) with wasmtime_tagtype_param_count() + wasmtime_tagtype_param(nth), matching the component type accessor iterator pattern - Rename WASM_EXTERN_TAG → WASMTIME_EXTERN_TAG - Simplify CTagType: stores TagType directly, no Arc<Mutex<LazyTagType>> - Update C++ TagType wrapper: constructor takes Engine&, Ref exposes param_count() / param(nth) instead of params() returning ListRef - Add ValType::c_to_kind() static helper used by TagType::Ref::param() - Fix null-pointer panic for zero-length param arrays in Rust
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
show more ...
|
|
Revision tags: v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1, v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1, v37.0.2, v37.0.1, v37.0.0, v36.0.2, v36.0.1, v36.0.0, v35.0.0, v24.0.4, v33.0.2, v34.0.2, v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0, v33.0.0 |
|
| #
62f60665 |
| 21-Apr-2025 |
Alex Crichton <[email protected]> |
Move various C++ type-related items to their own header (#10627)
* Move C++ `ValType` to its own header
And fill out some small tests
* Move C++ `GlobalType` to its own header
* Move C++ `TableTy
Move various C++ type-related items to their own header (#10627)
* Move C++ `ValType` to its own header
And fill out some small tests
* Move C++ `GlobalType` to its own header
* Move C++ `TableType` to its own file
With some small tests
* Move C++ `FuncType` to its own file
* Move C++ ImportType to its own file
* Move C++ `ExportType` to its own file
* Move C++ `ExternType` to its own file
show more ...
|
| #
34e2e54d |
| 21-Apr-2025 |
Alex Crichton <[email protected]> |
Move C++ `MemoryType` to its own header (#10623)
While here fill out its API a bit with a builder type and some tests.
|