suborbital / sdk

Plugin libraries for languages supported by Suborbital E2 Core
Apache License 2.0
1 stars 1 forks source link

[WIP] Include current wit-bindgen configuration #16

Open flaki opened 1 year ago

flaki commented 1 year ago

Bindings for JS/TS are currently auto-generated by an earlier version of wit-bindgen, the result of which is included in this repo at typescript/src/bindings. This PR serves as both documentation and initial reproduction of the process for generating these bindings from a wit file.

The wit interface is derived from @ospencer's original PR, removing the APIs that have been deprecated since.

Note that generating the JS bindings uses an older, specific version of wit-bindgen and JS binding generation has been removed in later versions, this PR and wit interface could serve as a basis of bringing this feature up-to-date with the WebAssembly Component Model and modern versions of wit-bindgen.

Please also note, that albeit the Dockerfile will generate the Rust bindings, as provided by this version of wit-bindgen, the current SDK uses manually written Rust language bindings, not auto-generated ones.