use wasm_bindgen::prelude::*; macro_rules! console_log { ($($t:tt)*) => (log(&format_args!($($t)*).to_string())) } #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_namespace = console)] fn log(s: &str); } #[wasm_bindgen(start)] pub fn entry() { use web_sys; console_log!("hello {} wasm", 42); let window = web_sys::window().unwrap(); let document = window.document().unwrap(); let body = document.body().unwrap(); //body.set_inner_html("

Hello from WASM

"); body.set_inner_html("oho"); }