mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-09 22:28:21 +00:00
chore(api) Allow complex types.
This commit is contained in:
2
lib/api/src/externals/function.rs
vendored
2
lib/api/src/externals/function.rs
vendored
@@ -313,6 +313,7 @@ trait VMDynamicFunction {
|
||||
}
|
||||
|
||||
struct VMDynamicFunctionWithoutEnv {
|
||||
#[allow(clippy::type_complexity)]
|
||||
func: Box<dyn Fn(&[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
|
||||
function_type: FunctionType,
|
||||
}
|
||||
@@ -330,6 +331,7 @@ struct VMDynamicFunctionWithEnv<Env>
|
||||
where
|
||||
Env: Sized,
|
||||
{
|
||||
#[allow(clippy::type_complexity)]
|
||||
func: Box<dyn Fn(&mut Env, &[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
|
||||
env: *mut Env,
|
||||
function_type: FunctionType,
|
||||
|
||||
@@ -45,6 +45,7 @@ pub trait LikeNamespace {
|
||||
#[derive(Clone, Default)]
|
||||
pub struct ImportObject {
|
||||
map: Arc<Mutex<HashMap<String, Box<dyn LikeNamespace>>>>,
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub(crate) state_creator: Option<Arc<dyn Fn() -> (*mut c_void, fn(*mut c_void)) + 'static>>,
|
||||
/// Allow missing functions to be generated and instantiation to continue when required
|
||||
/// functions are not provided.
|
||||
|
||||
Reference in New Issue
Block a user