near/wasmer

Make instantiation return a concrete error type

Closed this issue · 0 comments

Today https://docs.rs/wasmer-engine-universal-near/latest/wasmer_engine_universal/struct.UniversalArtifact.html#method.instantiate returns a dynamic error type. This is because the trait implemented here is part of wasmer_vm but the underlying error type (InstantiationError) itself is a part of wasmer_engine crate.

We want to match on this error in nearcore, so we should figure a way to make this method return some concrete type, and not a dyn Error.