fn call_exported_function()

in shenyu-wasm-build/src/instance.rs [72:87]


    fn call_exported_function(
        &self,
        export_name: String,
        arguments: Vec<WasmValue>,
    ) -> Result<Box<[WasmValue]>, Error> {
        let function: DynFunc = self.instance.exports.get(&export_name).map_err(|_| {
            runtime_error(format!(
                "Exported function `{}` does not exist",
                export_name
            ))
        })?;

        function
            .call(arguments.as_slice())
            .map_err(|e| runtime_error(format!("{}", e)))
    }