Skip to content

epic: component seam and error model #77

Description

@mfw78

Turn the concrete capability backends into a trait seam and make the backend-to-HostError conversions idiomatic.

HostState holds concrete ProviderPool/OrderBookPool/ModuleStore, and the backend-to-HostError projections are hand-written match-ladders. This epic defines async backend traits (ChainProvider, CowApi, StateStore, Clock, Random, HttpClient) over the existing pools without changing callers, then replaces the projection functions with From impls. Purely additive; no signatures move yet.

Delivery order: backend traits -> From for HostError.


Design target (whole M0): a runtime is defined by its associated types (RuntimeTypes), assembled from pluggable component builders, declared by a type-state RuntimeBuilder, and spun up by a separate imperative launcher that returns a RuntimeHandle. Cross-cutting concerns attach as RuntimeAddOns. The library must be embeddable with zero CLI surface; the nexum binary is one consumer of the same builder. Bias every change toward move + add-trait-bound, not rewrite; each sub-issue keeps the tree compiling and tests green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/engine-hosthost-interface implementations (the host impls layer)epicTracks a larger initiative.

    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