Skip to content
/ dbg Public

dbg! replacement for wasm32

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

wasm-rs/dbg

Repository files navigation

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