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

Drop support for old-style *.witx files #195

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

alexcrichton
Copy link
Member

I today started looking at updating this project to the new draft of the
canonical ABI specified at WebAssembly/component-model#23 and while
there's quite a few changes that need to happen the first thing that
struck me was that maintaining all of the support for old-style witx
files is pretty onerous. Especially the ABI-calculating code has lots of
special cases for various witx constructs and the Preview1 ABI, and I
wasn't really sure how to update this in many situations.

Overall the original purpose of the witx support was to prove out that
it's possible to support both the old witx abi and the new canonical ABI
in the same generator. The canonical ABI has changed significantly in
the meantime however and this doesn't necessarily make sense to do any
more. I think it would be best now to reevaluate at the point when WASI
is ready to switch to the component model what to do with the old witx
support. I no longer think that "build it in here" is the obvious
option. As this diff shows there's quite a bit of weight to carry the
old witx abis as this commit clocks in at nearly 7000 lines removed.

The specifics being dropped here are:

  • Parsing support for *.witx
  • Support for Pointer and ConstPointer
  • Support for WitxInstruction
  • Support for push/pull buffers

The push/pull buffer feature was never actually fully implemented, even
for Rust hosts they only kind-of worked. Most other generators never
even implemented support for them. Additionally support for other
*.witx constructs was somewhat spotty at best with very few tests.

My hope is that there are no existing users of this support. If there
are then I think it's best to re-evaluate how best to solve the scenario
on-hand.

I today started looking at updating this project to the new draft of the
canonical ABI specified at WebAssembly/component-model#23 and while
there's quite a few changes that need to happen the first thing that
struck me was that maintaining all of the support for old-style witx
files is pretty onerous. Especially the ABI-calculating code has lots of
special cases for various witx constructs and the Preview1 ABI, and I
wasn't really sure how to update this in many situations.

Overall the original purpose of the witx support was to prove out that
it's possible to support both the old witx abi and the new canonical ABI
in the same generator. The canonical ABI has changed significantly in
the meantime however and this doesn't necessarily make sense to do any
more. I think it would be best now to reevaluate at the point when WASI
is ready to switch to the component model what to do with the old witx
support. I no longer think that "build it in here" is the obvious
option. As this diff shows there's quite a bit of weight to carry the
old witx abis as this commit clocks in at nearly 7000 lines removed.

The specifics being dropped here are:

* Parsing support for `*.witx`
* Support for `Pointer` and `ConstPointer`
* Support for `WitxInstruction`
* Support for push/pull buffers

The push/pull buffer feature was never actually fully implemented, even
for Rust hosts they only kind-of worked. Most other generators never
even implemented support for them. Additionally support for other
`*.witx` constructs was somewhat spotty at best with very few tests.

My hope is that there are no existing users of this support. If there
are then I think it's best to re-evaluate how best to solve the scenario
on-hand.
Copy link
Member

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

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

Fantastic! It was pretty hard to reason through many spots in the code generators due to the legacy support and this definitely cleans things up a bit.

@alexcrichton alexcrichton merged commit 1f9e602 into bytecodealliance:main Apr 19, 2022
@alexcrichton alexcrichton deleted the drop-witx branch April 19, 2022 19:23
alexcrichton added a commit to alexcrichton/witx-bindgen that referenced this pull request Apr 19, 2022
Further iteration from bytecodealliance#195 and dropping more features that are only
needed for `*.witx`, the `usize` and `char8` types were only added for
backcompat with witx itself.
alexcrichton added a commit to alexcrichton/witx-bindgen that referenced this pull request Apr 19, 2022
alexcrichton added a commit that referenced this pull request Apr 19, 2022
Some more vestigial remains from #195
alexcrichton added a commit to alexcrichton/witx-bindgen that referenced this pull request Apr 19, 2022
Further iteration from bytecodealliance#195 and dropping more features that are only
needed for `*.witx`, the `usize` and `char8` types were only added for
backcompat with witx itself.
alexcrichton added a commit that referenced this pull request Apr 20, 2022
Further iteration from #195 and dropping more features that are only
needed for `*.witx`, the `usize` and `char8` types were only added for
backcompat with witx itself.
alexcrichton added a commit to alexcrichton/witx-bindgen that referenced this pull request Apr 20, 2022
Not actually needed for anything after bytecodealliance#195
alexcrichton added a commit that referenced this pull request Apr 20, 2022
Not actually needed for anything after #195
@alexcrichton alexcrichton mentioned this pull request Apr 22, 2022
21 tasks
willemneal pushed a commit to AhaLabs/wit-bindgen that referenced this pull request May 31, 2022
I today started looking at updating this project to the new draft of the
canonical ABI specified at WebAssembly/component-model#23 and while
there's quite a few changes that need to happen the first thing that
struck me was that maintaining all of the support for old-style witx
files is pretty onerous. Especially the ABI-calculating code has lots of
special cases for various witx constructs and the Preview1 ABI, and I
wasn't really sure how to update this in many situations.

Overall the original purpose of the witx support was to prove out that
it's possible to support both the old witx abi and the new canonical ABI
in the same generator. The canonical ABI has changed significantly in
the meantime however and this doesn't necessarily make sense to do any
more. I think it would be best now to reevaluate at the point when WASI
is ready to switch to the component model what to do with the old witx
support. I no longer think that "build it in here" is the obvious
option. As this diff shows there's quite a bit of weight to carry the
old witx abis as this commit clocks in at nearly 7000 lines removed.

The specifics being dropped here are:

* Parsing support for `*.witx`
* Support for `Pointer` and `ConstPointer`
* Support for `WitxInstruction`
* Support for push/pull buffers

The push/pull buffer feature was never actually fully implemented, even
for Rust hosts they only kind-of worked. Most other generators never
even implemented support for them. Additionally support for other
`*.witx` constructs was somewhat spotty at best with very few tests.

My hope is that there are no existing users of this support. If there
are then I think it's best to re-evaluate how best to solve the scenario
on-hand.
willemneal pushed a commit to AhaLabs/wit-bindgen that referenced this pull request May 31, 2022
willemneal pushed a commit to AhaLabs/wit-bindgen that referenced this pull request May 31, 2022
Further iteration from bytecodealliance#195 and dropping more features that are only
needed for `*.witx`, the `usize` and `char8` types were only added for
backcompat with witx itself.
willemneal pushed a commit to AhaLabs/wit-bindgen that referenced this pull request May 31, 2022
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.

2 participants