Skip to content

Build the wit directory specified by wit_bidngen::generate! - #31

Merged
scothis merged 1 commit into
componentized:mainfrom
scothis:component-wit
Nov 22, 2026
Merged

scothis merged 1 commit into
componentized:mainfrom
scothis:component-wit

Conversation

@scothis

@scothis scothis commented Nov 22, 2026

Copy link
Copy Markdown
Member

Cargo based components now refresh the wit directory specified by the wit_bindgen::generate! macro's wit value, defaulting to wit. This allows a component to define a custom directory for the wit it builds against and no longer assumes ./components/wit.

The search looks into local crates that use the generate macro, but will not descend into published crates. The check is lexical and can be fooled by other macros named generate! or the wit-bindgen macro being aliased to a different name.

Cargo based components now refresh the wit directory specified by the
`wit_bindgen::generate!` macro's `wit` value, defaulting to `wit`. This
allows a component to define a custom directory for the wit it builds
against and no longer assumes ./components/wit.

The search looks into local crates that use the generate macro, but
will not descend into published crates. The check is lexical and can be
fooled by other macros named `generate!` or the wit-bindgen macro being
aliased to a different name.

Signed-off-by: Scott Andrews <scott@andrews.me>
@scothis
scothis merged commit f108175 into componentized:main Nov 22, 2026
13 checks passed
@scothis
scothis deleted the component-wit branch November 22, 2026 18:46
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.

1 participant