Skip to content

Usage of import/export is confusing and should be hidden #34

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

Closed
alexcrichton opened this issue Jul 12, 2021 · 1 comment
Closed

Usage of import/export is confusing and should be hidden #34

alexcrichton opened this issue Jul 12, 2021 · 1 comment
Labels
open question Big topics that have no clear answer at this time

Comments

@alexcrichton
Copy link
Member

Right now all language bindings (and the CLI) support import and export modes. Figuring out what this means within each language generator is confusing and easily forgotten. I don't like how this has shaped up. Internally I think this distinction is necessary for configuring what sort of bindings are generated where, but ideally this would not be a concern of an end-user.

I'm not sure how to fix this though since *.witx files are fundamentally only intended to describe "half" where they're describing either what a wasm module is importing or what a wasm module is exporting. Hosts may want to prefer to say "here's the adapter module that I'm working with" and have everything generated from that. Wasm programs seem like they still want to separate imports/exports, though.

That may actually be the fix? We could have hosts deal with imports/exports all at once where you just say "here's the shape of the wasm module I'm generating bindings for" but the import/export terminology and split sticks around for guests compiled to wasm.

In any case I haven't given this too too much thought but I wanted to at least jot down some ideas and the fact that this is an issue I'd like to fix.

@alexcrichton alexcrichton added the open question Big topics that have no clear answer at this time label May 3, 2022
@alexcrichton
Copy link
Member Author

I'm going to close this in favor of #314 and the advent of *.world files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open question Big topics that have no clear answer at this time
Projects
None yet
Development

No branches or pull requests

1 participant