1 2 3 4 5 6 7 8 9
#![cfg(target_arch = "wasm32")] use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_namespace = console, js_name = error)] pub fn console_error(s: &str); }