wasm-rs-dbg

Crates.iowasm-rs-dbg
lib.rswasm-rs-dbg
version0.1.2
sourcesrc
created_at2021-02-05 17:06:29.01694
updated_at2021-02-20 23:12:53.95081
descriptiondbg! macro for WebAssembly environment
homepage
repositoryhttps://github.com/wasm-rs/dbg
max_upload_size
id351182
size22,858
Yurii Rashkovskii (yrashk)

documentation

https://docs.rs/wasm-rs-dbg

README

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

Commit count: 19

cargo fmt