I'm working on adding wasi:http support to System.Net.Http, and part of that requires generating bindings for wasi:http and adding them to src/libraries/System.Net.Http/src in the .NET runtime source tree. That results in hundreds of compiler errors (including warnings treated as errors), so I'm working on cleaning those up.
Some of the errors are about CLS conformance, i.e. the compiler (or linter) complaining that the public API of the generated code is not language-agnostic. But in this case (and probably in most cases), we don't even want the generated code to be part of the public API. So three options come to mind:
internal instead of public by default in the C# wit-bindgen generatorpublic)internal, but add an option to use public insteadThoughts?
First one seem good to me.
I went ahead and implemented the third option since it's a superset of the first one and easy enough.
Last updated: Dec 13 2025 at 17:03 UTC