mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 05:18:43 +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 {
|
struct VMDynamicFunctionWithoutEnv {
|
||||||
|
#[allow(clippy::type_complexity)]
|
||||||
func: Box<dyn Fn(&[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
|
func: Box<dyn Fn(&[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
|
||||||
function_type: FunctionType,
|
function_type: FunctionType,
|
||||||
}
|
}
|
||||||
@@ -330,6 +331,7 @@ struct VMDynamicFunctionWithEnv<Env>
|
|||||||
where
|
where
|
||||||
Env: Sized,
|
Env: Sized,
|
||||||
{
|
{
|
||||||
|
#[allow(clippy::type_complexity)]
|
||||||
func: Box<dyn Fn(&mut Env, &[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
|
func: Box<dyn Fn(&mut Env, &[Val]) -> Result<Vec<Val>, RuntimeError> + 'static>,
|
||||||
env: *mut Env,
|
env: *mut Env,
|
||||||
function_type: FunctionType,
|
function_type: FunctionType,
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ pub trait LikeNamespace {
|
|||||||
#[derive(Clone, Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct ImportObject {
|
pub struct ImportObject {
|
||||||
map: Arc<Mutex<HashMap<String, Box<dyn LikeNamespace>>>>,
|
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>>,
|
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
|
/// Allow missing functions to be generated and instantiation to continue when required
|
||||||
/// functions are not provided.
|
/// functions are not provided.
|
||||||
|
|||||||
Reference in New Issue
Block a user