ianaio-console

Crates.ioianaio-console
lib.rsianaio-console
version0.1.2
sourcesrc
created_at2024-06-04 08:04:21.641545
updated_at2024-06-08 07:16:37.276401
descriptionConvenience crate for working with browser's console
homepagehttps://rustwasm.iana.io/console/
repositoryhttps://github.com/ianaio/console
max_upload_size
id1260847
size37,190
ianaio (ianaio)

documentation

https://docs.rs/ianaio-console/

README

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);
Commit count: 11

cargo fmt