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

[C] Prefex function export names with exports_. #1107

Merged

Conversation

sunfishcode
Copy link
Member

In the C bindings, prefix exported function names with exports_ so that a world that imports and exports the same function can do so without collisions.

For example, with this WIT:

package green:blue;

world my-world {
  import purple: func();
  export purple: func();
}
```wit

This fixes a wit-bindgen panic with:

duplicate symbols: "name my_world_purple already defined"

In the C bindings, prefix exported function names with `exports_` so
that a world that imports and exports the same function can do so
without collisions.

For example, with this WIT:

```wit
package green:blue;

world my-world {
  import purple: func();
  export purple: func();
}
```wit

This fixes a wit-bindgen panic with:

```
duplicate symbols: "name `my_world_purple` already defined"
```
@alexcrichton alexcrichton added this pull request to the merge queue Dec 18, 2024
Merged via the queue into bytecodealliance:main with commit ad6dbc5 Dec 18, 2024
25 checks passed
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

Successfully merging this pull request may close these issues.

2 participants