History log of /wasmtime-44.0.1/crates/c-api/include/wasmtime/error.hh (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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, 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
# 311d023a 04-Nov-2025 Alex Crichton <[email protected]>

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

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.

show more ...


Revision tags: v38.0.3, v38.0.2, 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
# 313f23d8 29-Apr-2025 Alex Crichton <[email protected]>

Test C/C++ headers can be included in isolation (#10694)

* Test C/C++ headers can be included in isolation

I frequently make mistakes about this, so I figure it's good to at least
try to test this.

Test C/C++ headers can be included in isolation (#10694)

* Test C/C++ headers can be included in isolation

I frequently make mistakes about this, so I figure it's good to at least
try to test this. It's not possible to fully test AFAIK but this is
hopefully at least something.

* Fix header discovery location

* Don't test `conf.h.in`

* Try to fix windows CI

show more ...


# 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 ...


# d460709e 22-Apr-2025 Alex Crichton <[email protected]>

Move C++ `Config` to its own header (#10634)

Also bind APIs which were added since this was created. Also copy over
some `#define` guards for the C methods into the C++ header as well. And
finally u

Move C++ `Config` to its own header (#10634)

Also bind APIs which were added since this was created. Also copy over
some `#define` guards for the C methods into the C++ header as well. And
finally update tests for what's added.

show more ...


# 0467d6f9 21-Apr-2025 Alex Crichton <[email protected]>

Sketch out merging the C/C++ APIs (#10600)

* Sketch out merging the C/C++ APIs

With the merging of the C++ API into this repository in #10582 it opens
up some interesting questions about how to org

Sketch out merging the C/C++ APIs (#10600)

* Sketch out merging the C/C++ APIs

With the merging of the C++ API into this repository in #10582 it opens
up some interesting questions about how to organize the C++ API.
Externally it was all entirely a single file, but naturally this isn't
great for evolution as it's just one giant tangled header. Instead this
commit sketches out a possible different path forward which is to
provide the C++ API as a sibling to the C API in preexisting header
files. For example this moves the `Error` class to the `error.h` header
file as an example.

My rough hope would be that in the long-term we could deprecate/remove
the `wasmtime.hh` header file and instead "just" have all the C++ APIs
in the normal header files (e.g. `wasmtime.h`). Additionally the split
of the C API in separate header files would be amenable to a similar
split of the C++ API too where the API you see is basically conditional
on the language mode of whatever's including the headers.

I'll note though I've not seen prior art in doing this. I'm not aware of
any other project which exports both a C and C++ API in its header
files. That being said I'm not sure how many other projects would fall
in such a bucket.

* Split out `error.hh` to its own file

show more ...