#debugging #dbg #replace

wasm-rs-dbg

dbg! macro for WebAssembly environment

3 releases

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

#388 in WebAssembly

Download history 5134/week @ 2024-11-15 5737/week @ 2024-11-22 6715/week @ 2024-11-29 2646/week @ 2024-12-06 4152/week @ 2024-12-13 839/week @ 2024-12-20 1741/week @ 2024-12-27 2843/week @ 2025-01-03 9977/week @ 2025-01-10 4406/week @ 2025-01-17 3981/week @ 2025-01-24 9878/week @ 2025-01-31 6611/week @ 2025-02-07 3408/week @ 2025-02-14 4452/week @ 2025-02-21 4795/week @ 2025-02-28

22,072 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