3 releases

0.1.2 Feb 20, 2021
0.1.1 Feb 20, 2021
0.1.0 Feb 5, 2021

#767 in WebAssembly

Download history 7745/week @ 2023-12-18 2784/week @ 2023-12-25 6039/week @ 2024-01-01 8708/week @ 2024-01-08 11102/week @ 2024-01-15 10161/week @ 2024-01-22 12321/week @ 2024-01-29 15072/week @ 2024-02-05 16284/week @ 2024-02-12 5029/week @ 2024-02-19 3065/week @ 2024-02-26 6183/week @ 2024-03-04 7768/week @ 2024-03-11 13644/week @ 2024-03-18 9210/week @ 2024-03-25 8917/week @ 2024-04-01

39,713 downloads per month
Used in 2 crates

MIT/Apache

9KB
56 lines

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

Dependencies

~0–2MB
~40K SLoC