!temp Move HostFunction, Func & co. into wasmer.

Because `Func` needs an access to the runtime API (`wasmer-runtime`)
to trap properly, either we move parts of `wasmer-runtime` to
`wasm-common`, or we move parts of `wasm-common` into `wasmer`. I
decided to go with the second approach since `wasmer` is the only
crate to use `HostFunction` & co. It's not “common” by definition, and
it's way easier (for the moment).
This commit is contained in:
Ivan Enderlin
2020-06-19 15:20:28 +02:00
parent 4afdd94d7a
commit 5e26d9a74b
7 changed files with 495 additions and 489 deletions

View File

@@ -13,9 +13,9 @@ use crate::externals::function::{
FunctionDefinition, HostFunctionDefinition, VMDynamicFunction, VMDynamicFunctionWithEnv,
VMDynamicFunctionWithoutEnv, WasmFunctionDefinition,
};
use crate::{Function, FunctionType, RuntimeError, Store};
use crate::{Function, FunctionType, RuntimeError, Store, WasmTypeList};
use std::panic::{catch_unwind, AssertUnwindSafe};
use wasm_common::{NativeWasmType, WasmExternType, WasmTypeList};
use wasm_common::{NativeWasmType, WasmExternType};
use wasmer_runtime::{
ExportFunction, VMContext, VMDynamicFunctionContext, VMFunctionBody, VMFunctionKind,
};