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
There's an error type returned from Module::from_file that is public but isn't exported from the crate. It's therefore impossible to import that type to match against the error in a project that uses the wasmer crate.
It's also impossible to do something like
#[derive(Debug, thiserror::Error)]pubenumCustomError{#[error("Failed to load Wasm module")]InvalidModule(#[from] wasmer::IoCompileError),// How to import `IoCompileError`?// ...}
Solutions
The simplest solution might be to just export the error type from the root module of the wasmer crate.
An alternative is to change the error type returned by Module::from_file, if the IoCompileError shouldn't be public.
The text was updated successfully, but these errors were encountered:
3311: Export Module::IoCompileError as it's an error returned by an exported function r=ptitSeb a=ptitSeb
# Description
Export Module::IoCompileError as it's an error returned by an exported function (for #3267 )
Co-authored-by: ptitSeb <[email protected]>
Motivation
There's an error type returned from
Module::from_file
that is public but isn't exported from the crate. It's therefore impossible to import that type to match against the error in a project that uses thewasmer
crate.It's also impossible to do something like
Solutions
The simplest solution might be to just export the error type from the root module of the
wasmer
crate.An alternative is to change the error type returned by
Module::from_file
, if theIoCompileError
shouldn't be public.The text was updated successfully, but these errors were encountered: