Skip to content

Conversation

@alexcrichton
Copy link
Member

This commit is the dual of bytecodealliance/wasm-tools#1149 where the code is being moved from the wit-parser crate into this repository where it's mainly developed. This commit adds a wit_bindgen_core::abi module with the same contents as before with small refactorings to avoid inherent methods on Resolve.

Note that this temporarily switches to a git dependency for the wasm-tools family of crates which will be reverted back to a crates.io dependency one they're published.

This commit is the dual of bytecodealliance/wasm-tools#1149 where the
code is being moved from the `wit-parser` crate into this repository
where it's mainly developed. This commit adds a `wit_bindgen_core::abi`
module with the same contents as before with small refactorings to avoid
inherent methods on `Resolve`.

Note that this temporarily switches to a git dependency for the
wasm-tools family of crates which will be reverted back to a crates.io
dependency one they're published.
@guybedford
Copy link
Contributor

Nice! I assume the interface is mostly unchanged in the move?

@alexcrichton
Copy link
Member Author

Yeah this is intended to be a copy/paste, and the only real difference is that instead of self.resolve.foo(...) it's now abi::foo(self.resolve, ...)

@cpetig
Copy link
Collaborator

cpetig commented Aug 15, 2023

Also a "Nice!" from me. The post-return change in wasm-tools looks worth its own PR as well.

@guybedford
Copy link
Contributor

I was able to update jco to this branch and can confirm it all works as expected.

@alexcrichton alexcrichton marked this pull request as ready for review August 18, 2023 15:08
@alexcrichton alexcrichton merged commit 8b3e23e into bytecodealliance:main Aug 18, 2023
@alexcrichton alexcrichton deleted the move-abi-code branch August 18, 2023 15:22
@peterhuene
Copy link
Member

With this now merged, any chance we can do a wasm-tools and wit-bindgen release?

Without one, cargo-component has to generate projects with the same patch.crates-io in it for the wasm-tools dependencies to get things building (currently it references wit-bindgen by git for the resources support), which isn't great.

@alexcrichton
Copy link
Member Author

Sounds good to me! I'll work on the bump PRs later today if no one else has beaten me to it by then.

Wow and I forgot to send this message until I'm ready to do the bumps, sorry about that!

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.

4 participants