#webassembly #web #console #browser #group #modular

gloo-console

Convenience crate for working with browser’s console

3 unstable releases

new 0.2.1 Nov 25, 2021
0.2.0 Oct 24, 2021
0.1.0 Jul 28, 2021

#164 in WebAssembly

Download history 84/week @ 2021-08-09 515/week @ 2021-08-16 1874/week @ 2021-08-23 1367/week @ 2021-08-30 503/week @ 2021-09-06 752/week @ 2021-09-13 424/week @ 2021-09-20 523/week @ 2021-09-27 603/week @ 2021-10-04 1379/week @ 2021-10-11 2159/week @ 2021-10-18 1976/week @ 2021-10-25 1643/week @ 2021-11-01 1480/week @ 2021-11-08 1858/week @ 2021-11-15 1675/week @ 2021-11-22

5,199 downloads per month
Used in 2 crates

MIT/Apache

16KB
254 lines

gloo-console

Crates.io version Download docs.rs docs

API Docs | Contributing | Chat

Built with 🦀🕸 by The Rust and WebAssembly Working Group

The JavaScript's console object provides access to the browser's console. Using the console object in Rust/WASM directly is cumbersome as it requires JavaScript glue code. This crate exists to solve this problem by providing a set of ergonomic Rust APIs to deal with the browser console.

Example

The following example logs text to the console using console.log

use gloo_console::log;
let object = JsValue::from("any JsValue can be logged");
log!("text", object)

Dependencies

~9MB
~176K SLoC

!şa