Created
May 4, 2019 14:33
-
-
Save Kixiron/c71009191cfdca5931dcd033d7350a99 to your computer and use it in GitHub Desktop.
WASM Console.log()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[wasm_bindgen] | |
extern "C" { | |
#[wasm_bindgen(js_namespace = console)] | |
fn log(s: &str); | |
} | |
macro_rules! console_log { | |
($($t:tt)*) => (log(&format_args!($($t)*).to_string())) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment