You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a reimangining of the ComponentInterface, modeled after a
compiler pipeline. The differences are:
- Data-oriented API. It has `pub` fields rather than getter methods.
- Tree-like. Fields represent nodes in the tree. You can understand
`BindingsIr` by following the fields.
- Data is stored directly in the nodes, for example types now have an
`is_used_as_error` field instead of having to lookup the type name in
`ComponentInterface::errors`.
- Each node contains a `LanguageData` container. Bindings generators
will put language-specific data in here as part of the bindings IR
specialization process. For example: `type_name`, `ffi_converter` and
`ffi_type_name`. To accomplish this, `Type`, `FfiType` and `Literal` are
now structs, which store a `kind` enum.
- It tries to make a stronger distinction between definitions and
references to those definitions.
- Type and FFI types are sorted in dependency order. This replaces the
the Python bindings code that does something similar to avoid forward
references.
Languages can opt-in to the new API by converting the
`ComponentInterface` into a `BindingsIr`. At some point we start
converting the metadata directly to `BindingsIr` and remove a ton of
ComponentInterface code. Let's make sure to give external bindings
authors time to move to the new system.
0 commit comments