(
engine: &wasm_engine_t,
path: *const c_char,
out: &mut *mut wasmtime_module_t,
)
| 216 | |
| 217 | #[unsafe(no_mangle)] |
| 218 | pub unsafe extern "C" fn wasmtime_module_deserialize_file( |
| 219 | engine: &wasm_engine_t, |
| 220 | path: *const c_char, |
| 221 | out: &mut *mut wasmtime_module_t, |
| 222 | ) -> Option<Box<wasmtime_error_t>> { |
| 223 | let path = CStr::from_ptr(path); |
| 224 | let result = path |
| 225 | .to_str() |
| 226 | .context("input path is not valid utf-8") |
| 227 | .and_then(|path| Module::deserialize_file(&engine.engine, path)); |
| 228 | handle_result(result, |module| { |
| 229 | *out = Box::into_raw(Box::new(wasmtime_module_t { module })); |
| 230 | }) |
| 231 | } |
no test coverage detected