Function wasmer_compiler::object::module::emit_data

source ·
pub fn emit_data(
    obj: &mut Object<'_>,
    name: &[u8],
    data: &[u8],
    align: u64,
) -> Result<(), ObjectError>
Expand description

Write data into an existing object.

§Usage


let mut object = get_object_for_target(&triple)?;
emit_data(&mut object, b"WASMER_METADATA", &b"Hello, World!"[..], 1)?;