(
store: &mut wasm_store_t,
binary: &wasm_byte_vec_t,
)
| 32 | #[unsafe(no_mangle)] |
| 33 | #[cfg(any(feature = "cranelift", feature = "winch"))] |
| 34 | pub unsafe extern "C" fn wasm_module_new( |
| 35 | store: &mut wasm_store_t, |
| 36 | binary: &wasm_byte_vec_t, |
| 37 | ) -> Option<Box<wasm_module_t>> { |
| 38 | match Module::from_binary(store.store.context().engine(), binary.as_slice()) { |
| 39 | Ok(module) => Some(Box::new(wasm_module_t::new(module))), |
| 40 | Err(_) => None, |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | #[unsafe(no_mangle)] |
| 45 | #[cfg(any(feature = "cranelift", feature = "winch"))] |