Skip to content
This issue has been moved to a discussionGo to the discussion

Rust/C++ Interop #3892

@benwis

Description

@benwis

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?

Activity

locked and limited conversation to collaborators on Mar 15, 2024
converted this issue into a discussion #3893 on Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @benwis

        Issue actions

          Rust/C++ Interop · Issue #3892 · rustwasm/wasm-bindgen