5 unstable releases

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

#262 in WebAssembly

Download history 15245/week @ 2024-01-11 13394/week @ 2024-01-18 14007/week @ 2024-01-25 13495/week @ 2024-02-01 14099/week @ 2024-02-08 13480/week @ 2024-02-15 14075/week @ 2024-02-22 14241/week @ 2024-02-29 14674/week @ 2024-03-07 13931/week @ 2024-03-14 15568/week @ 2024-03-21 15245/week @ 2024-03-28 13637/week @ 2024-04-04 16317/week @ 2024-04-11 15360/week @ 2024-04-18 11204/week @ 2024-04-25

58,952 downloads per month
Used in 106 crates (18 directly)

MIT/Apache

31KB
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

~6.5–9MB
~175K SLoC