And the Rust code, for completeness ``` #[wasm_bindgen] #[no_mangle] pub fn return_string() -> JsVa

And the Rust code, for completeness

#[wasm_bindgen]
#[no_mangle]
pub fn return_string() -> JsValue {
    JsValue::from_str(&format!("Hello from rust, {}!", "James"))
}
Was this page helpful?