#[no_mangle]
pub unsafe extern "C" fn wasm_global_new(
store: &mut wasm_store_t,
ty: &wasm_globaltype_t,
val: &wasm_val_t,
) -> Option<Box<wasm_global_t>>Expand description
Creates a new wasm_global_t from the given wasm_globaltype_t and wasm_val_t.
Returns a null pointer if ty and val does not match.
Wraps Global::new.
§Safety
It is the caller’s responsibility not to alias the wasm_global_t
with its underlying, internal WasmStoreRef.