Closed
Description
This doesn't work, but it should:
#[wasm_bindgen]
extern {
#[wasm_bindgen(js_name = String)]
pub extern type JsString;
pub fn slice(this: &JsString, start: u32, end: u32) -> JsString;
}
This is blocking all the String
related bindings in #275.
I haven't dug in very far, but I think the issue is that strings are special cased by wasm-bindgen to always copy in/out of wasm memory, and so we can't reference them as an opaque extern type.