Skip to main content

owned_str

Function owned_str 

Source
pub fn owned_str(out: &mut CodeValue, s: &str)
Expand description

Write a Str into out from a freshly-built Rust string. Leaks the CString — acceptable here because the value crosses into the host’s own heap the moment your code_module_dispatch returns (the host deep-copies your result and then calls your module’s code_release on it, which only ever frees what runtime.c’s own allocator built, never this leaked buffer).