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

feat(api): Add .wit interface #203

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

feat(api): Add .wit interface #203

wants to merge 2 commits into from

Conversation

ospencer
Copy link
Contributor

@ospencer ospencer commented Feb 1, 2022

Draft because Reactr does not conform to canonical ABI, so this wit file cannot be used to generate bindings that will "just work."

@ospencer ospencer requested a review from a team February 1, 2022 18:18
@ospencer ospencer self-assigned this Feb 1, 2022
@ospencer ospencer marked this pull request as draft February 1, 2022 18:22
api/env.wit Outdated Show resolved Hide resolved
Copy link

@flaki flaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@flaki
Copy link

flaki commented Aug 1, 2022

Do we also plan to have the generation upstreamed here or in the new repo @ospencer ? Can't do much more, without that but the wit looks alright to me.

@ospencer
Copy link
Contributor Author

ospencer commented Aug 1, 2022

What do you mean?

@flaki
Copy link

flaki commented Aug 1, 2022

Correct me if I'm wrong but my understanding was that these wit interfaces are the source that auto-generate the glue code of e.g. #272 through wit-bindgen?

If that's correct, I don't think the process of this generation is shared anywhere?

@ospencer
Copy link
Contributor Author

ospencer commented Aug 1, 2022

Yes, that's true. I see what you mean. I'm sort of against having an automated process/script to do it since it's unstable and only works for JS because of a hack (and this wit file isn't checked in).

For reference though, the command to generate the JS files is wit-bindgen js --import env.wit.

@ospencer
Copy link
Contributor Author

ospencer commented Aug 1, 2022

Once we do the breaking changes to make bindgen work, we'll definitely have it automated for as many languages as possible.

@flaki
Copy link

flaki commented Aug 1, 2022

Sounds good, thanks for elaborating!

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.

None yet

2 participants