diff --git a/algebra/Cargo.toml b/algebra/Cargo.toml index 245e96ed..14e899ca 100644 --- a/algebra/Cargo.toml +++ b/algebra/Cargo.toml @@ -25,6 +25,7 @@ rayon = { version = "1", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] js-sys = "0.3.27" +web-sys = { version = "0.3.61", features = [ "console" ] } wasm-bindgen-futures = "0.4.23" tokio = { version = "1.10.1", features = ['rt'] } wasm-rs-async-executor = "0.9.0" diff --git a/algebra/src/bls12_381/g1.rs b/algebra/src/bls12_381/g1.rs index aa7073cc..3f0de72f 100644 --- a/algebra/src/bls12_381/g1.rs +++ b/algebra/src/bls12_381/g1.rs @@ -147,6 +147,7 @@ impl Group for BLSG1 { // unsafe here is alright because WASM is single threaded unsafe { if WASM_INSTANCE.is_none() { + web_sys::console::log_1(&"FastMSM for WASM has not been initialized, and the proof generation will use the Rust-based implementation. To initialize FastMSM, call the async WASM function `init_noah()` to initialize the Noah library before proof generation.".into()); return Self::common_multi_exp(scalars, points); }