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

feat: component bindgen: add support for multiple wit paths #9288

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lwansbrough
Copy link

This change makes it possible to compile bindings from multiple wit source paths. It resolves #9249 and is heavily informed by the work done for wit-bindgen in bytecodealliance/wit-bindgen#1003

I had to modify one existing test (trappable_errors_with_versioned_and_unversioned_packages) to support this behaviour as the existing test was created without the expectation that the world in tests/codegen/unversioned-foo.wit would be considered a candidate world for selection.

@lwansbrough lwansbrough requested a review from a team as a code owner September 19, 2024 23:44
@lwansbrough lwansbrough requested review from alexcrichton and removed request for a team September 19, 2024 23:44
@lwansbrough lwansbrough changed the title feat: bindgen: add support for multiple wit paths feat: component bindgen: add support for multiple wit paths Sep 19, 2024
@lwansbrough
Copy link
Author

might need some guidance on how to setup the expanded tests

@alexcrichton
Copy link
Member

Thanks for the work here! This all looks great to me, so all that's left is sorting out CI and tests and such. For the expanded tests you can run the tests with BINDGEN_TEST_BLESS=1 set in your environment to automatically update the expectations (and then check them in as a commit). For testing this feature itself feel free to use either the codegen test suite (which may mean you'll need to set up some directories if you don't use preexisting ones) or set up some directories in tests/all/component_model/*, whichever you find easiest.

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.

Support list of paths in component bindgen macro
2 participants