wasm-rs-dbg 0.1.2

dbg! macro for WebAssembly environment
Documentation

dbg! for wasm32

Crate API Chat

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.

Usage

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;

License

Licensed under either of