https_everywhere_lib_wasm/
debugging.rs1use wasm_bindgen::prelude::*;
2
3#[wasm_bindgen]
4extern {
5 pub fn alert(s: &str);
6
7 #[wasm_bindgen(js_namespace = console)]
8 pub fn log(s: &str);
9
10 #[wasm_bindgen(js_namespace = console, js_name = log)]
11 fn log_u32(a: u32);
12
13 #[wasm_bindgen(js_namespace = console, js_name = log)]
14 fn log_many(a: &str, b: &str);
15}
16
17#[macro_export]
19macro_rules! console_log {
20 ($($t:tt)*) => (crate::debugging::log(&format_args!($($t)*).to_string()))
21}