Function wasmer_compiler::object::module::emit_serialized

source ·
pub fn emit_serialized(
    obj: &mut Object<'_>,
    sercomp: &[u8],
    triple: &Triple,
    object_name: &str,
) -> Result<(), ObjectError>
Expand description

Emit the compilation result into an existing object.

§Usage


let bytes = &[ /* compilation bytes */];
let mut object = get_object_for_target(&triple)?;
emit_serialized(&mut object, bytes, &triple, "WASMER_MODULE")?;