WebAssembly / wasi-crypto

WASI Cryptography API Proposal
162 stars 25 forks source link

The confused about witx defination update #35

Closed sonder-joker closed 2 years ago

sonder-joker commented 2 years ago

I notice the witx defination not same with WASI 's witx. It seem's change after 3cbda273127c77c6bfb16600abc273fc02cba738 but WASI's repo not update. The witx defination in the repo use witx = { package = "witnext", version = "0.10.0-beta3" }. So which prefer to use? And whether WASI repo would use newer witx defination next?

jedisct1 commented 2 years ago

The witx crate was changed to use a slightly different format (abi-next). The definitions here were updated accordingly.

These changes were reverted in the witx crate, but there's now a witx2 crate being developed, that only supports two formats: the one used here (abi-next branch), and a completely new syntax.

Tooling-wise, witx-codegen only supports the one used here, and it is necessary to generate the documentation and bindings.

Eventually, tools using the witx crate will also support the witx2 one, but besides the syntax, there were a lot of internal changes. So it will require some work to do so.

The new syntax from witx2 is still a work in progress but it is great, and is likely to become the actual, stable standard. So, eventually, there will be a single, stable witx version compatible with everything.