wasmer_object

Function 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

use wasmer_object::{get_object_for_target, emit_data};

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