pub fn patch_call(
assembly: &[u8],
type_name: &str,
method_name: &str,
library: &str,
symbol: &str,
) -> Result<Vec<u8>>Available on crate feature
hao only.Expand description
Rewrites assembly so type_name::method_name begins by calling the native
function symbol, exported from library (resolved as a [DllImport]).
Returns the patched assembly bytes.
The native function is bound as static extern void symbol(), so it takes no
arguments; it runs wherever the engine calls the patched method.