Function wasmer_object::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)?;