4 releases

0.2.3 Aug 21, 2022
0.2.1 Nov 25, 2021
0.2.0 Oct 24, 2021
0.1.0 Jul 28, 2021

#318 in WebAssembly

Download history 5545/week @ 2022-12-03 6652/week @ 2022-12-10 6135/week @ 2022-12-17 5139/week @ 2022-12-24 5335/week @ 2022-12-31 7954/week @ 2023-01-07 6285/week @ 2023-01-14 7368/week @ 2023-01-21 7968/week @ 2023-01-28 6409/week @ 2023-02-04 7442/week @ 2023-02-11 7032/week @ 2023-02-18 7196/week @ 2023-02-25 8356/week @ 2023-03-04 8016/week @ 2023-03-11 6586/week @ 2023-03-18

31,003 downloads per month
Used in 109 crates (9 directly)

MIT/Apache

29KB
450 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

~7–9.5MB
~184K SLoC