currently we use serde_wasm_bindgen, which is a hacky way to serialize stuff to / from js value, e.g. it doesn't support with well. We could instead use a binary serialization format to avoid footguns. This could be pushed more in future to allow for array buffer transfers (and maybe even zero copy)