4 releases
0.2.3 | Aug 21, 2022 |
---|---|
0.2.1 | Nov 25, 2021 |
0.2.0 | Oct 24, 2021 |
0.1.0 | Jul 28, 2021 |
#318 in WebAssembly
31,003 downloads per month
Used in 109 crates
(9 directly)
29KB
450 lines
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–9.5MB
~184K SLoC