#console #browser #console-log #object #ianaio #api-bindings #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

#126 in Profiling

Download history 400/week @ 2024-06-03 35/week @ 2024-06-10

435 downloads per month
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

~6.5–9MB
~176K SLoC