[][src]Function ffishim::shim_allocator_setting

pub fn shim_allocator_setting() -> TokenStream

TokenStream which, when executed, sets the allocator to a known default.

This is useful to ensure we use the same allocator as the system allocator. The data moving across the FFI boundary sees its ownership move along with it. Some pieces of the host system might need to allocate/free chunks of data it is passing to the rust library.