augurs_js/lib.rs
1#![doc = include_str!("../README.md")]
2#![warn(
3 missing_docs,
4 missing_debug_implementations,
5 rust_2018_idioms,
6 unreachable_pub
7)]
8
9use wasm_bindgen::prelude::*;
10
11pub mod ets;
12pub mod mstl;
13
14/// Initialize the logger and panic hook.
15///
16/// This will be called automatically when the module is imported.
17/// It sets the default tracing subscriber to `tracing-wasm`, and
18/// sets WASM panics to print to the console with a helpful error
19/// message.
20#[wasm_bindgen(start)]
21pub fn custom_init() {
22 #[cfg(feature = "console_error_panic_hook")]
23 console_error_panic_hook::set_once();
24 tracing_wasm::try_set_as_global_default().ok();
25}