From 1b6a7e0d00703e3da2e1620b5a2b2cba027161de Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 28 Jan 2020 09:55:58 +0100 Subject: Implement game of life --- src/console.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/console.rs (limited to 'src/console.rs') diff --git a/src/console.rs b/src/console.rs new file mode 100644 index 0000000..4efbd80 --- /dev/null +++ b/src/console.rs @@ -0,0 +1,5 @@ +use wasm_bindgen::prelude::JsValue; + +pub fn log(str: &str) { + web_sys::console::log_1(&JsValue::from_str(str)); +} -- cgit v1.2.3