#console #ianaio #console-log #browser #logging #access

ianaio-console

Convenience crate for working with browser's console

3 releases

0.1.2 Jun 8, 2024
0.1.1 Jun 4, 2024
0.1.0 Jun 4, 2024

#546 in WebAssembly


Used in ianaio

Custom license

18KB
263 lines

ianaio-console

Crates.io version Download docs.rs docs

API Docs | Contributing | Chat

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.

Example

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);

Dependencies

~7–10MB
~187K SLoC