(
linker: &mut wasmtime_linker_t,
module: *const u8,
module_len: usize,
name: *const u8,
name_len: usize,
ty: &wasm_functype_t,
callback: crate::wasmtime_func_async_callbac
| 277 | |
| 278 | #[unsafe(no_mangle)] |
| 279 | pub unsafe extern "C" fn wasmtime_linker_define_async_func( |
| 280 | linker: &mut wasmtime_linker_t, |
| 281 | module: *const u8, |
| 282 | module_len: usize, |
| 283 | name: *const u8, |
| 284 | name_len: usize, |
| 285 | ty: &wasm_functype_t, |
| 286 | callback: crate::wasmtime_func_async_callback_t, |
| 287 | data: *mut c_void, |
| 288 | finalizer: Option<extern "C" fn(*mut std::ffi::c_void)>, |
| 289 | ) -> Option<Box<wasmtime_error_t>> { |
| 290 | let ty = ty.ty().ty(linker.linker.engine()); |
| 291 | let module = to_str!(module, module_len); |
| 292 | let name = to_str!(name, name_len); |
| 293 | let cb = c_async_callback_to_rust_fn(callback, data, finalizer); |
| 294 | |
| 295 | handle_result( |
| 296 | linker.linker.func_new_async(module, name, ty, cb), |
| 297 | |_linker| (), |
| 298 | ) |
| 299 | } |
| 300 | |
| 301 | async fn do_linker_instantiate_async( |
| 302 | linker: &wasmtime_linker_t, |
no test coverage detected