You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading wasm modules into .NET with wasmtime, an exception is raised if a module is invalid. This exception doesn't provide any details as to what went wrong, however, making it hard to fix the module.
Allowing this information to be captured in a callback or in a mutable pointer to a string that could capture the Debug derive for the anyhow::Error would be helpful in diagnosing errors that occur when loading modules.
The text was updated successfully, but these errors were encountered:
This commit replaces the use of `wasm_module_new` with `wasmtime_module_new`
which can include the error message for failing to load the module.
Fixesbytecodealliance#7.
This commit replaces the use of `wasm_module_new` with `wasmtime_module_new`
which can include the error message for failing to load the module.
Fixesbytecodealliance#7.
Feature
When loading wasm modules into .NET with wasmtime, an exception is raised if a module is invalid. This exception doesn't provide any details as to what went wrong, however, making it hard to fix the module.
Implementation
The .NET implementation relies on the
wasm_module_new
function.https://github.com/bytecodealliance/wasmtime/blob/121bbd36568c506a39b2dd97a95dd2b963960eb7/crates/c-api/src/lib.rs#L828
This function currently discards the error information with a match expression:
https://github.com/bytecodealliance/wasmtime/blob/121bbd36568c506a39b2dd97a95dd2b963960eb7/crates/c-api/src/lib.rs#L836
Allowing this information to be captured in a callback or in a mutable pointer to a string that could capture the Debug derive for the
anyhow::Error
would be helpful in diagnosing errors that occur when loading modules.The text was updated successfully, but these errors were encountered: