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

#354 in Profiling

Download history 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 13312/week @ 2024-04-25 13999/week @ 2024-05-02 12544/week @ 2024-05-09 12584/week @ 2024-05-16 12005/week @ 2024-05-23 13660/week @ 2024-05-30 12520/week @ 2024-06-06 13473/week @ 2024-06-13 12343/week @ 2024-06-20 11169/week @ 2024-06-27

51,647 downloads per month
Used in 104 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