Skip to content

Parse wit folder in generate! with inline - #1356

Merged
pchickey merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:lookup-default-when-using-inline
Aug 19, 2025
Merged

Parse wit folder in generate! with inline#1356
pchickey merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:lookup-default-when-using-inline

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit updates handling of the inline attribute in the generate! macro of the Rust bindings generator. Previously if inline was specified it would by default lookup nothing on the filesystem unless path was specified. This contradicts the documentation though that ./wit is the default lookup path. To resolve this this commit adds a check to see if ./wit exists, and if so parses it. This keeps the default search path behavior without requiring its existence when using inline.

This commit updates handling of the `inline` attribute in the
`generate!` macro of the Rust bindings generator. Previously if `inline`
was specified it would by default lookup nothing on the filesystem
unless `path` was specified. This contradicts the documentation though
that `./wit` is the default lookup path. To resolve this this commit
adds a check to see if `./wit` exists, and if so parses it. This keeps
the default search path behavior without requiring its existence when
using `inline`.
@pchickey
pchickey added this pull request to the merge queue Aug 19, 2025
Merged via the queue into bytecodealliance:main with commit 859a7ea Aug 19, 2025
22 checks passed
@alexcrichton
alexcrichton deleted the lookup-default-when-using-inline branch August 19, 2025 17:26
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