3 releases

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

#342 in WebAssembly

Download history 2794/week @ 2024-07-21 3943/week @ 2024-07-28 3790/week @ 2024-08-04 3817/week @ 2024-08-11 3264/week @ 2024-08-18 2065/week @ 2024-08-25 651/week @ 2024-09-01 353/week @ 2024-09-08 587/week @ 2024-09-15 3721/week @ 2024-09-22 5145/week @ 2024-09-29 4114/week @ 2024-10-06 5403/week @ 2024-10-13 3487/week @ 2024-10-20 5706/week @ 2024-10-27 2208/week @ 2024-11-03

17,173 downloads per month
Used in 6 crates (3 directly)

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–2.3MB
~42K SLoC