You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hopefully I'm just missing something obvious here, but attempting to use minicov in wasm-pack's hello-wasm example leads to the following:
use wasm_bindgen::prelude::*;// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global// allocator.#[cfg(feature = "wee_alloc")]#[global_allocator]staticALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;#[wasm_bindgen]extern"C"{fnalert(s:&str);}#[wasm_bindgen]pubfngreet(){alert("Hello, hello-wasm!");letmut coverage = vec![];unsafe{// Note that this function is not thread-safe! Use a lock if needed.
minicov::capture_coverage(&mut coverage).unwrap();}alert(&format!("coverage: {coverage:?}"));}
0rphon@iPhone:/mnt/5406d0e6-37e3-4679-9dc2-24193550d990/Work/LeakSignal/tmp/hello-wasm$ RUSTFLAGS="-Cinstrument-coverage -Zno-profiler-runtime" rustup run nightly wasm-pack build
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
Compiling hello-wasm v0.1.0 (/mnt/5406d0e6-37e3-4679-9dc2-24193550d990/Work/LeakSignal/tmp/hello-wasm)
Finished release [optimized] target(s) in 0.24s
[INFO]: ⬇️ Installing wasm-bindgen...
thread 'main' panicked at 'non-i32 constant', crates/wasm-interpreter/src/lib.rs:266:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Running the wasm-bindgen CLI
Caused by: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit status: 101
full command: "/home/0rphon/.cache/.wasm-pack/wasm-bindgen-5f26acfc988649a3/wasm-bindgen" "/mnt/5406d0e6-37e3-4679-9dc2-24193550d990/Work/LeakSignal/tmp/hello-wasm/target/wasm32-unknown-unknown/release/hello_wasm.wasm" "--out-dir" "/mnt/5406d0e6-37e3-4679-9dc2-24193550d990/Work/LeakSignal/tmp/hello-wasm/pkg" "--typescript" "--target" "bundler"
The text was updated successfully, but these errors were encountered:
hopefully I'm just missing something obvious here, but attempting to use minicov in wasm-pack's
hello-wasm
example leads to the following:The text was updated successfully, but these errors were encountered: