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

#636 in Profiling

Download history 59057/week @ 2025-09-17 67500/week @ 2025-09-24 57717/week @ 2025-10-01 50777/week @ 2025-10-08 50347/week @ 2025-10-15 47002/week @ 2025-10-22 50229/week @ 2025-10-29 47474/week @ 2025-11-05 48457/week @ 2025-11-12 50344/week @ 2025-11-19 33503/week @ 2025-11-26 50836/week @ 2025-12-03 48287/week @ 2025-12-10 45933/week @ 2025-12-17 20695/week @ 2025-12-24 28026/week @ 2025-12-31

152,255 downloads per month
Used in 116 crates (22 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

~7–10MB
~182K SLoC