Skip to main content

Crate forge_ir_bindgen

Crate forge_ir_bindgen 

Source
Expand description

WIT bindings for the OpenAPI Forge plugin worlds, plus conversions to and from forge_ir.

wasmtime::component::bindgen! produces one set of generated types per world. Both ir-transformer and code-generator import host-api and use the same types interface, but the macro generates separate Rust modules per world (the types are structurally identical but nominally distinct).

This crate exposes both as bindings::transformer and bindings::generator, plus a convert module providing fallible conversions between the bindgen types and forge_ir.

Modules§

bindings
wasmtime::component::bindgen!-generated bindings for both worlds.
convert
Conversions between bindgen-generated WIT types and forge_ir.

Enums§

BindgenError
Errors returned when fallible conversions hit a boundary violation.

Functions§

validate_refs
Validate that every TypeRef in ir resolves to a NamedType.id. The host runs this on every IR returned from a plugin before passing it to the next stage.