Crates.io | ianaio-console |
lib.rs | ianaio-console |
version | 0.1.2 |
source | src |
created_at | 2024-06-04 08:04:21.641545 |
updated_at | 2024-06-08 07:16:37.276401 |
description | Convenience crate for working with browser's console |
homepage | https://rustwasm.iana.io/console/ |
repository | https://github.com/ianaio/console |
max_upload_size | |
id | 1260847 |
size | 37,190 |
ianaio-console
Built with 🦀🕸 by The IanaIO 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.
The following example logs text to the console using console.log
use ianaio_console::log;
let object = JsValue::from("any JsValue can be logged");
log!("text", object);