mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 21:58:20 +00:00
Add misc clean ups and corrections
This commit is contained in:
10
lib/c-api/src/wasm_c_api/externals/function.rs
vendored
10
lib/c-api/src/wasm_c_api/externals/function.rs
vendored
@@ -101,6 +101,7 @@ pub unsafe extern "C" fn wasm_func_new_with_env(
|
||||
let func_sig = &function_type.inner().function_type;
|
||||
let num_rets = func_sig.results().len();
|
||||
|
||||
#[derive(wasmer::WasmerEnv)]
|
||||
#[repr(C)]
|
||||
struct WrapperEnv {
|
||||
env: *mut c_void,
|
||||
@@ -115,15 +116,6 @@ pub unsafe extern "C" fn wasm_func_new_with_env(
|
||||
}
|
||||
}
|
||||
|
||||
impl wasmer::WasmerEnv for WrapperEnv {
|
||||
fn init_with_instance(
|
||||
&mut self,
|
||||
_instance: &wasmer::Instance,
|
||||
) -> Result<(), wasmer::HostEnvInitError> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
let inner_callback =
|
||||
move |env: &mut WrapperEnv, args: &[Val]| -> Result<Vec<Val>, RuntimeError> {
|
||||
let processed_args: wasm_val_vec_t = args
|
||||
|
||||
Reference in New Issue
Block a user