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

#425 in Profiling

Download history 16489/week @ 2024-10-18 15505/week @ 2024-10-25 14910/week @ 2024-11-01 12222/week @ 2024-11-08 13871/week @ 2024-11-15 14058/week @ 2024-11-22 15948/week @ 2024-11-29 13480/week @ 2024-12-06 13091/week @ 2024-12-13 9254/week @ 2024-12-20 9310/week @ 2024-12-27 12873/week @ 2025-01-03 16466/week @ 2025-01-10 13350/week @ 2025-01-17 13997/week @ 2025-01-24 13116/week @ 2025-01-31

59,119 downloads per month
Used in 90 crates (15 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

~11MB
~204K SLoC