Skip to content

engine-host: make HostState generic over a Components bundle #87

Description

@mfw78

Problem. HostState hard-codes concrete cow/chain/store fields and the ten WIT impls bind to it; restart also rebuilds the linker and duplicates the store-construction literal.

Change. Introduce a Clone Components bundle of the trait-bounded backends; make HostState<C> generic; rewrite the ten impl ... Host for HostState blocks as impl<C: ..>; thread the generic through Linker/Store/Supervisor. Add HostState::<C>::new(&Components, &ModuleCtx) used by both load_one and reinstantiate_one, removing the duplicated build.

Files. host/state.rs, all host/impls/*.rs, supervisor.rs, bootstrap.rs.

Risk / size. High blast-radius but mechanical; land isolated. Single largest diff. Size: L.

Depends on. the backend traits (E2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingWill break existing modules or the host contract.component/engine-hosthost-interface implementations (the host impls layer)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions