Update: created a small test app (react calling wasm rust code) but cant recreate rust exception, however this one liner is an extract from bit bigger function and I am still on to find what particular combo is leading to this exception
https://github.com/zkbitcoin/react-rust-wasm-vector-test
instructions:
a) clone b) rustup component add rust-src --toolchain nightly-2022-11-17-x86_64-apple-darwin c) yarn build:wasm d) yarn build e) yarn start
I compiled this sample rust code to WASM (note this one liner runs fine in standard non WASM environment)
let s = vec![vec![1usize; 131072]; 38];
This code fails in Chrome with:
rust_alloc_error_handler ... at alloc::vec::from_elem
Does anyone know how to overcome it? I tried both default and wee_alloc, both are failing.