Replies: 1 comment 2 replies
-
The issue arises when
Yes, because whatever compiler
rust-lang/rust#71871 explains it quite well, if you manage to avoid calling/linking or fix functions with this kind of ABI incompatibility, you can get away with it.
Only Rustc targeting |
Beta Was this translation helpful? Give feedback.
-
If I have a Rust project with C/C++ bindings, say treesitter and its parsers, and try to compile that together with cc to Webassembly with wasm32-unknown-unknown, will the ABI issues mentioned here cause errors between the two?
https://github.com/rust-lang/lang-team/blob/master/design-meeting-minutes/2021-04-21-wasm-abi.md
I've found plenty of references to it:
WebAssembly/tool-conventions#88 (comment)
rust-lang/rust#63626
https://github.com/rust-lang/rust/blob/2da942f32802c8233a09744024dfbc34431adf65/src/librustc_target/abi/call/mod.rs#L570-L572
rust-lang/rust#71871
https://github.com/rust-lang/rust/blob/9ab0749ce3fe33fdf84ac2f5b6c6e56b78dc10e8/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs#L20-L28
I'm trying to understand the problem space. Is it common/prevalent/limited to certain situations? Does it only matter if I compile something Rust to wasm32-wasi or something C to emscripten and then call it from Rust compiled to Webassembly?
Beta Was this translation helpful? Give feedback.
All reactions