This micro-crate provides a drop-in replacement for std::dbg
macro
that logs to console
when compiled for wasm32-unknown-unknown
and falls back to std::dbg
on all other platforms.
Include this dependency in your Cargo.toml
:
[dependencies]
wasm-rs-dbg = "0.1.2"
Then, in files where you want to use WebAssembly-enabled logging to console
, use this import:
use wasm_rs_dbg::dbg;
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.