uptown_funk 0.1.3

Define host functions compatible with Wasmer and Wasmtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
#[link(wasm_import_module = "env")]
extern "C" {
    fn write(value: f64, destination: *mut f64);
}

#[export_name = "test"]
pub extern "C" fn test() {
    let mut destination: f64 = 0.0;
    unsafe { write(0.64, &mut destination as *mut f64) };
    assert_eq!(destination, 0.64);
}