This micro-crate provides a drop-in replacement for std::dbg
macro
that logs to console
when compiled for wasm32
and falls back to std::dbg
on all other platforms.
Include this dependency in your Cargo.toml
:
toml
[dependencies]
wasm-rs-dbg = "0.1.0"
Then, in files where you want to use WebAssembly-enabled logging to console
, use this import:
rust
use wasm_rs_dbg::dbg;
Licensed under either of