(
&self,
store: &mut Store<Host>,
params: &[wasmtime::component::Val],
func: wasmtime::component::Func,
results: &mut Vec<wasmtime::component::Val>,
)
| 835 | |
| 836 | #[cfg(feature = "component-model")] |
| 837 | async fn call_component_func( |
| 838 | &self, |
| 839 | store: &mut Store<Host>, |
| 840 | params: &[wasmtime::component::Val], |
| 841 | func: wasmtime::component::Func, |
| 842 | results: &mut Vec<wasmtime::component::Val>, |
| 843 | ) -> Result<(), Error> { |
| 844 | #[cfg(feature = "component-model-async")] |
| 845 | if self.run.common.wasm.concurrency_support.unwrap_or(true) { |
| 846 | store |
| 847 | .run_concurrent(async |store| func.call_concurrent(store, params, results).await) |
| 848 | .await??; |
| 849 | return Ok(()); |
| 850 | } |
| 851 | |
| 852 | func.call_async(&mut *store, ¶ms, results).await?; |
| 853 | Ok(()) |
| 854 | } |
| 855 | |
| 856 | /// Execute the default behavior for components on the CLI, looking for |
| 857 | /// `wasi:cli`-based commands and running their exported `run` function. |
no test coverage detected