| 1111 | /// details on Wasmtime's out-of-memory handling. |
| 1112 | #[cfg(feature = "async")] |
| 1113 | pub async fn call_async( |
| 1114 | &self, |
| 1115 | mut store: impl AsContextMut<Data: Send>, |
| 1116 | params: &[Val], |
| 1117 | results: &mut [Val], |
| 1118 | ) -> Result<()> { |
| 1119 | let mut store = store.as_context_mut(); |
| 1120 | |
| 1121 | self.call_impl_check_args(&mut store, params, results)?; |
| 1122 | |
| 1123 | let result = store |
| 1124 | .on_fiber(|store| unsafe { self.call_impl_do_call(store, params, results) }) |
| 1125 | .await??; |
| 1126 | Ok(result) |
| 1127 | } |
| 1128 | |
| 1129 | /// Perform dynamic checks that the arguments given to us match |
| 1130 | /// the signature of this function and are appropriate to pass to this |