Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusing opaque rust type across bridges in same file #1212

Open
NikolaBo opened this issue May 11, 2023 · 1 comment
Open

Reusing opaque rust type across bridges in same file #1212

NikolaBo opened this issue May 11, 2023 · 1 comment

Comments

@NikolaBo
Copy link

I am following #942 to reuse an opaque rust type across cxx bridges by manually implementing ExternType. I found that if the two cxx bridges are in the same file it fails.

  error[cxxbridge]: the name `Process` is defined multiple times
     ┌─ src/main.rs:34:9
     │
  34 │         type Process = crate::handle::Process;
     │         ^^^^^^^^^^^^ the name `Process` is defined multiple times

However, if i move one of the modules containing a bridge to another file it works.

Here is an example of the issue, and the same bridges working when separated to different files.

@schreter
Copy link
Contributor

We have a solution internally and a RFC and a PR open here (#1187) since months.

Unfortunately, there is absolutely no feedback by the crate owner on the PRs and RFCs here (we have a lot of advanced functionality already used in our project, but I can't get it upstreamed w/o owner's review).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants