Return type normalization, and change return errors from imported functions

This commit is contained in:
Lachlan Sneff
2019-04-22 11:42:52 -07:00
parent 85d9ca9ad2
commit 74b6ba4eaf
8 changed files with 115 additions and 109 deletions

View File

@ -17,6 +17,12 @@ pub use self::utils::is_wasi_module;
use wasmer_runtime_core::{func, import::ImportObject, imports};
/// This is returned in the Box<dyn Any> RuntimeError::Error variant.
/// Use `downcast` or `downcast_ref` to retrieve the `ExitCode`.
pub struct ExitCode {
pub code: syscalls::types::__wasi_exitcode_t,
}
pub fn generate_import_object(
args: Vec<Vec<u8>>,
envs: Vec<Vec<u8>>,