Closed thstart closed 1 year ago
@thstart You could use wasm-bindgen
, but you should define your own Javascript API interface in that case. CellID is a u64
type so we cannot use Javascript Number
type for that. I think following type signature could be used for the job.
#[wasm_bindgen]
pub fn cellid_from_latlng(lat: f32, lng: f32) -> String
I was able to generate wasm.
Are there an example how to use from Javascript?