Open temeddix opened 1 month ago
Rust does not use the multivalue ABI and it's very hard to get it to do so (you need a custom target that you compile manually). Though to clarify further:
extern "wasm"
used to be a thing that technically could result in the multivalue ABI. extern "wasm"
got removed.-C target-feature=+multivalue
, but this was always broken without also rebuilding std, which requires nightly.Thank you for the details, maybe the cause might be something else. It does look like whenever using u128
makes the problem in debug mode. We're only using extern "C"
without the +multivalue
feature activated.
I had somewhat similar with FRB. Whenever I was using u8, I was getting a stack overflow exception: https://github.com/fzyzcjy/flutter_rust_bridge/issues/2341
Report
As of September 2024, running a RInf app on the web in debug mode can print the error like below.
This is because LLVM is currently broken with multivalue types(such asu128
) onwasm32-unknown-unknown
target of Rust. Related issues are listed below. This is not something that Rinf can solve, but an issue we should wait for a fix from LLVM.https://github.com/rust-lang/rust/issues/88207https://github.com/rust-lang/rust/issues/127318https://github.com/llvm/llvm-project/issues/98323Compiling webassembly module in release mode with
rinf wasm --release
is the workaround for now.Steps to Reproduce
Write any code that uses
u128
in Rust and run the app in debug mode.System Information
Please provide the output from the command below, using markdown codeblock syntax.