3 releases

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

#512 in WebAssembly

Download history 2143/week @ 2024-06-13 2229/week @ 2024-06-20 2465/week @ 2024-06-27 2888/week @ 2024-07-04 3417/week @ 2024-07-11 2822/week @ 2024-07-18 4107/week @ 2024-07-25 3809/week @ 2024-08-01 3817/week @ 2024-08-08 3063/week @ 2024-08-15 2597/week @ 2024-08-22 1262/week @ 2024-08-29 345/week @ 2024-09-05 585/week @ 2024-09-12 2816/week @ 2024-09-19 3725/week @ 2024-09-26

7,590 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.2MB
~41K SLoC