reactr icon indicating copy to clipboard operation
reactr copied to clipboard

feat(api): Add .wit interface

Open ospencer opened this issue 2 years ago • 6 comments

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

ospencer avatar Feb 01 '22 18:02 ospencer

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.

flaki avatar Aug 01 '22 18:08 flaki

What do you mean?

ospencer avatar Aug 01 '22 18:08 ospencer

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. suborbital/reactr#272 through wit-bindgen?

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

flaki avatar Aug 01 '22 18:08 flaki

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 avatar Aug 01 '22 18:08 ospencer

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

ospencer avatar Aug 01 '22 18:08 ospencer

Sounds good, thanks for elaborating!

flaki avatar Aug 01 '22 19:08 flaki