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

#414 in Profiling

Download history 15043/week @ 2024-07-21 14244/week @ 2024-07-28 15418/week @ 2024-08-04 17054/week @ 2024-08-11 14169/week @ 2024-08-18 15657/week @ 2024-08-25 14598/week @ 2024-09-01 15054/week @ 2024-09-08 12568/week @ 2024-09-15 15842/week @ 2024-09-22 16675/week @ 2024-09-29 13501/week @ 2024-10-06 15448/week @ 2024-10-13 16730/week @ 2024-10-20 14998/week @ 2024-10-27 14175/week @ 2024-11-03

62,750 downloads per month
Used in 108 crates (21 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
~186K SLoC