Skip to content

support "--with" parameter to include already generated types - #1627

Open
cpetig wants to merge 1 commit into
bytecodealliance:mainfrom
cpetig:c_with_include
Open

cpetig wants to merge 1 commit into
bytecodealliance:mainfrom
cpetig:c_with_include

Conversation

@cpetig

@cpetig cpetig commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

This implements --with for C in a way similar to C++ (include) and Rust (external type path).

@cpetig cpetig added the gen-c Related to the C code generator label Jun 7, 2026
@cpetig

cpetig commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator Author

I guess a test would be the ideal next step ...

🤔 The runner would import (half of) the exports by the test via a library, but this library design means that the test runner would need to run wit-bindgen twice for generating one component, also the test case linking becomes much more complex than now.

I feel this is beyond the capabilities of the current test runner 🤔

@alexcrichton

Copy link
Copy Markdown
Member

I think this would be best to have a test, yeah, and I agree the current infrastructure isn't sufficient to implement it. Would you be up for extending the test runner with support for this? It might make sense to reimplement the preexisting --with tests for Rust in terms of this too?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gen-c Related to the C code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants