cranelift_codegen::incremental_cache

Function serialize_compiled

Source
pub fn serialize_compiled(
    result: CompiledCodeBase<Stencil>,
) -> (CompiledCodeBase<Stencil>, Result<Vec<u8>, Error>)
Available on crate feature incremental-cache only.
Expand description

Given a function that’s been successfully compiled, serialize it to a blob that the caller may store somewhere for future use by try_finish_recompile.

As this function requires ownership on the CompiledCodeStencil, it gives it back at the end of the function call. The value is left untouched.