Add Wasmtime-specific C API functions to return errors (#1467)
* Add Wasmtime-specific C API functions to return errors This commit adds new `wasmtime_*` symbols to the C API, many of which mirror the existing counterparts in the `wasm.h` header. These APIs are enhanced in a number of respects: * Detailed error information is now available through a `wasmtime_error_t`. Currently this only exposes one function which is to extract a string version of the error. * There is a distinction now between traps and errors during instantiation and function calling. Traps only happen if wasm traps, and errors can happen for things like runtime type errors when interacting with the API. * APIs have improved safety with respect to embedders where the lengths of arrays are now taken as explicit parameters rather than assumed from other parameters. * Handle trap updates * Update C examples * Fix memory.c compile on MSVC * Update test assertions * Refactor C slightly * Bare-bones .NET update * Remove bogus nul handling
This commit is contained in:
23
RELEASES.md
23
RELEASES.md
@@ -2,6 +2,29 @@
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
## 0.16.0
|
||||
|
||||
Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
* The C API has a number of new `wasmtime_*` functions which return error
|
||||
objects to get detailed error information when an API fails.
|
||||
[#TODO](https://github.com/bytecodealliance/wasmtime/pull/TODO)
|
||||
|
||||
### Changed
|
||||
|
||||
* The `Func::call` API has changed its error type from `Trap` to `anyhow::Error`
|
||||
to distinguish between wasm traps and runtiem violations (like the wrong
|
||||
number of parameters).
|
||||
[#TODO](https://github.com/bytecodealliance/wasmtime/pull/TODO)
|
||||
|
||||
* A number of `wasmtime_linker_*` and `wasmtime_config_*` C APIs have new type
|
||||
signatures which reflect returning errors.
|
||||
[#TODO](https://github.com/bytecodealliance/wasmtime/pull/TODO)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
## 0.15.0
|
||||
|
||||
Unreleased
|
||||
|
||||
Reference in New Issue
Block a user