INNER CODE UNIT · Rust
n
sonos/tract · api/ffi/src/lib.rs:840
let n = (*runtime).0.name()?;
*name = CString::new(n)?.into_raw();
Ok(())
})
}
/// Convert a Model into a Runnable for this Runtime.
///
/// This function transfers ownership of the `model` argument to the newly-created `runnable` model.
///
/// Runnable are reference counted. When done, it should be released with `tract_runnable_release`.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tract_runtime_prepare(
runtime: *const TractRuntime,
model: *mut *mut TractModel,
runnable: *mut *mut TractRunnable,
) -> TRACT_RESULT {
wrap(|| unsafe {