wit-bindgen
wit-bindgen copied to clipboard
WIT linting
While discussing the design of WIT it has occasionally been suggested that certain things should be discouraged without being forbidden. Some examples:
- Referencing a
@deprecatedtype - Using deprecated WIT features
- Common reserved keywords as labels (
new,yield,assert, etc.) which can require awkward and confusing name mangling in some language bindings - Patterns that are expected to conflict with future features, like (proposed) resource properties
This could be handled by a linting tool, which might look like:
- A new
wit-bindgen lintsubcommand - Some mechanism to suppress specific lints, like a new WIT annotation e.g.
@allow(common-reserved-labels)
would this be appropriate for wasm-tools?
Sure, as far I'm concerned! The split between wasm-tools and wit-bindgen seems pretty arbitrary anyway.