|
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 |
|
| #
0126a941 |
| 03-Apr-2026 |
Nick Fitzgerald <[email protected]> |
Add `anyref` downcast methods to the C and C++ APIs (#12917)
|
| #
fc8dc5d2 |
| 03-Apr-2026 |
Nick Fitzgerald <[email protected]> |
Add support for `arrayref`s to the C and C++ APIs (#12916)
* Add support for `arrayref`s to the C and C++ APIs
Also array types and `ArrayRefPre`.
* add docs and address similar issues from struct
Add support for `arrayref`s to the C and C++ APIs (#12916)
* Add support for `arrayref`s to the C and C++ APIs
Also array types and `ArrayRefPre`.
* add docs and address similar issues from structref PR's review
* fix doc build
show more ...
|
| #
f960e9af |
| 02-Apr-2026 |
Nick Fitzgerald <[email protected]> |
Add support for `structref` to the C and C++ APIs (#12915)
* Add support for `structref` to the C and C++ APIs
Also requires adding support for struct and field types, as well as `StructRefPre`.
*
Add support for `structref` to the C and C++ APIs (#12915)
* Add support for `structref` to the C and C++ APIs
Also requires adding support for struct and field types, as well as `StructRefPre`.
* review feedback and rebase
* fix doc build
* really fix doc build
* fix more docs
show more ...
|
| #
a46300a7 |
| 01-Apr-2026 |
Nick Fitzgerald <[email protected]> |
Add `eqref` support to the C and C++ APIs (#12914)
* Add `eqref` support to the C and C++ APIs
* fix doc build
|
| #
0dbb6f3d |
| 31-Mar-2026 |
Chris Fallin <[email protected]> |
Exceptions: implement C API. (#12861)
* Exceptions: implement C API.
This PR implements C (and C++) API support for Wasm exceptions, one final remaining hurdle (aside from fuzz-testing) for making
Exceptions: implement C API. (#12861)
* Exceptions: implement C API.
This PR implements C (and C++) API support for Wasm exceptions, one final remaining hurdle (aside from fuzz-testing) for making exceptions tier-1 and on-by-default.
* Review feedback, and add exnref case to `wasmtime_val_t`.
* Review feedback: GC feature guard.
* clang-format
* add docs to exn.hh.
* Remove tag size asserts: broken on 32-bit platforms, but not needed for correctness wrt C struct.
show more ...
|
|
Revision tags: v43.0.0, 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 |
|
| #
579ec46b |
| 20-Oct-2025 |
Alex Crichton <[email protected]> |
capi: Start filling out C++ API for components (#11880)
* capi: Start filling out C++ API for components
I'd like to write some fancier tests soon for this, but I'm not a fan of writing C, so this
capi: Start filling out C++ API for components (#11880)
* capi: Start filling out C++ API for components
I'd like to write some fancier tests soon for this, but I'm not a fan of writing C, so this commit starts to fill out the C++ API for components by adding a few wrapper classes. Like the rest of the C++ API this is all built as a wrapper around the C API.
This commit introduces a `Component` type and an `ExportIndex` type to go along with it. This binds the `component.h` header file in C++. This also starts a convention of `capi` methods to access the underlying pointer/value as a conventional way to mix the C/C++ APIs which will allow gradually migrating tests to C++.
* Fix clippy lint
show more ...
|
|
Revision tags: v38.0.1, v37.0.2 |
|
| #
adff9d9d |
| 07-Oct-2025 |
Alex Crichton <[email protected]> |
Fix externref/anyref ownership in C/C++ API (#11799)
* Fix externref/anyref ownership in C/C++ API
This commit is a follow-up to #11514 which was discovered through failing tests in the wasmtime-py
Fix externref/anyref ownership in C/C++ API (#11799)
* Fix externref/anyref ownership in C/C++ API
This commit is a follow-up to #11514 which was discovered through failing tests in the wasmtime-py repository when updating to Wasmtime 37.0.0. Effectively a combination of bugs in the Rust API meant that it wasn't possible to use `externref` or `anyref` bindings correctly. The Rust changes in this commit are:
* `wasmtime_val_unroot` correctly drops the value now as opposed to effectively being a noop from before (typo of using `as_externref` vs `from_externref`). * `wasmtime_{anyref,externref,val}_t` now have a `Drop` implementation in Rust to correctly drop them if a value in Rust is dropped. This is required to correctly manage memory in the `wasmtime_func_{call,new}` implementations, for example. * `wasmtime_{anyref,externref,val}_clone` no longer have an unnecessary context parameter. * `wasmtime_{anyref,externref,val}_unroot` no longer have an unnecessary context parameter.
Changes in the C/C++ APIs are:
* `Result::{ok,err}_ref` APIs were added in addition to the preexisting rvalue accessors. * Loading/storing typed arguments now has an overload for `const T&` and `T&&` which behaves differently. Notably transferring ownership for `T&&` and not for `const T&`. This means that passing parameters when calling a wasm function uses `const T&`, but passing results from a host import uses `T&&`. * `TypedFunc::call` now uses `const Params&` instead of `Params` to explicitly specify it doesn't modify the parameters and forces using the `const T&` store method. * `Store::gc` is now a convenience method for `store.context().gc()` * `ExternRef`, `AnyRef`, and `Val` now have ownership semantics and destructors. This matches the spirit of #11514 for Rust but models it in C++ as well. This required filling out move/copy constructors/assignments. * The explicit `ExternRef` now takes `std::any` instead of `T`. * Minor issues related to ownership are fixed in `Val` bindings.
Valgrind was used to ensure that there were no leaks for the test suite which additionally resulted in a number of `*_delete` calls being added to tests using the C API (accidental omissions).
The original goal of this change was to be a patch release for 37.0.1 to enable updating wasmtime-py to the 37.0.x releases of Wasmtime. In the end though the changes here were broad enough that I no longer feel that this is a good idea, so wasmtime-py will be skipping the 37 version of Wasmtime.
* Run `clang-format`
prtest:full
show more ...
|
|
Revision tags: 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 |
|
| #
a045eaa9 |
| 28-Apr-2025 |
Alex Crichton <[email protected]> |
Run `clang-format` over more files (#10689)
We were already running it over most `*.c` files and other ones but forgot the `*.hh` and `*.cc` extensions which are being used for C++ bindings, so add
Run `clang-format` over more files (#10689)
We were already running it over most `*.c` files and other ones but forgot the `*.hh` and `*.cc` extensions which are being used for C++ bindings, so add those in and then run the formatter.
show more ...
|
| #
453bb9a4 |
| 28-Apr-2025 |
Alex Crichton <[email protected]> |
Split C++ Func/Table/Memory/Global to their own headers (#10688)
I did my best to separate out headers but I don't understand enough C++ to fully sever `val.hh` and `func.hh` so they sort of circula
Split C++ Func/Table/Memory/Global to their own headers (#10688)
I did my best to separate out headers but I don't understand enough C++ to fully sever `val.hh` and `func.hh` so they sort of circularly reference each other now.
show more ...
|
| #
ebc25c84 |
| 23-Apr-2025 |
Alex Crichton <[email protected]> |
Split out some more C++ types to their own headers (#10658)
* Move C++ WASI configuration to its own header
* Move C++ `Store` to its own file
I tried binding `wasmtime_store_epoch_deadline_callba
Split out some more C++ types to their own headers (#10658)
* Move C++ WASI configuration to its own header
* Move C++ `Store` to its own file
I tried binding `wasmtime_store_epoch_deadline_callback` in C++ but I don't know enough C++ to figure out the syntax for doing so.
* Move C++ Val to its own header
Also bind `AnyRef` while I'm here with some small tests.
show more ...
|