Skip to main content

Module capabilities

Module capabilities 

Source
Expand description

Per-target feature capability declarations and the loud-failure contract that replaces silent feature skipping.

Historically a backend that did not implement an IDL feature simply omitted it from its output: Go and Ruby dropped async functions, nine of eleven wrappers skipped callbacks and listeners, and nothing told the user. That class of silent degradation is banned: every generator now declares a TargetCapabilities and the orchestrator refuses to run a generator against an API that uses a feature the target does not support, listing each offending declaration by path.

A backend that gains a feature flips the corresponding flag and the gate opens; a backend that loses one (or a new feature lands in the IR before every backend implements it) fails generation with an actionable error instead of producing incomplete bindings.

Structs§

TargetCapabilities
The feature set a generator implements. Declared by every backend via LanguageBackend::capabilities / Generator::capabilities.
UnsupportedFeatures
A target was asked to generate bindings for an API that uses features it does not support. Carries every violation so the user sees the complete picture in one failure.

Enums§

Feature
An IDL feature whose support varies (or could vary) per target.

Functions§

check
Check api against one target’s declared capabilities. Ok(()) when the target supports every feature the API uses.
used_features
Every gated feature api uses, mapped to the locations (dotted IDL paths) that use it. Deterministic ordering for stable error output.