[][src]Function wapc::set_host_callback

pub fn set_host_callback<F>(callback: F) where
    F: Fn(&str, &[u8]) -> Result<Vec<u8>, Box<dyn Error>> + Sync + Send + 'static, 

Sets the callback function to be invoked when the guest module makes a host call.

Callback functions should be single-threaded wherever possible and execute quickly and be diligent about returning appropriate error results.