open-standards/openpay/crates/op-wasm/src/panic_hook.rs
Transaction Science 70ecd6caa0 Initial import — three open standards under one shelf
Transaction Science open standards monorepo. Each subdirectory is a
self-contained reference protocol with its own README and licence.

- openpay/    Apache-2.0  payment-acceptance stack (Rust, 26 crates)
- smart-byte/ CC-BY-4.0   content-addressed value carrier (spec)
- eoc/        CC-BY-4.0   energy-optimised compute (spec)

The wire format and the right to fork are public. The optional hosted
services are the offer; the protocols are not.
2026-05-23 07:58:09 -04:00

17 lines
416 B
Rust

//! Console panic hook (feature-gated).
//!
//! Forwards Rust panics into `console.error` so they show up in
//! browser devtools instead of as opaque `RuntimeError: unreachable`
//! at the wasm trap site.
#![cfg(feature = "console-panic-hook")]
use std::sync::Once;
static INSTALL: Once = Once::new();
pub(crate) fn install() {
INSTALL.call_once(|| {
console_error_panic_hook::set_once();
});
}