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

#419 in Profiling

Download history 14450/week @ 2024-09-05 14059/week @ 2024-09-12 14275/week @ 2024-09-19 16654/week @ 2024-09-26 14617/week @ 2024-10-03 14676/week @ 2024-10-10 16218/week @ 2024-10-17 15790/week @ 2024-10-24 14864/week @ 2024-10-31 12649/week @ 2024-11-07 13973/week @ 2024-11-14 13353/week @ 2024-11-21 16015/week @ 2024-11-28 14202/week @ 2024-12-05 13206/week @ 2024-12-12 9744/week @ 2024-12-19

55,420 downloads per month
Used in 109 crates (20 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
~187K SLoC