Skip to content

Design the exported endpoint WIT surface #3

Description

@lann

component-iroh is itself a component with a WIT surface: what applications import to get peer connectivity. Sketch and settle:

  • Connection API: connect(endpoint-id, alpn) -> connection / an accept path dispatched by ALPN (iroh's router layer), with QUIC streams surfaced as component-model streams and datagrams as one-shot messages.
  • Identity: how a node's Ed25519 identity is provisioned — minted via lann:webcrypto by the endpoint, or injected as a key resource by the embedder (the latter composes with platform-backed non-extractable keys).
  • Address lookup: whether discovery is internal machinery or a pluggable import (upstream iroh treats discovery as swappable; a WIT import would let deployments bring their own).
  • Layering for protocols: blobs/gossip-style protocols should be plain consumer components composed onto the endpoint via wac plug — verify the acyclic-instantiation constraint doesn't bite the accept path (the component-test suite/runner split hit the same shape).
  • Ownership boundaries: which types are structural (shareable) vs. resources owned by the endpoint component, following the siblings' types vs. stateful-interface split.

Constraint from the family: one copy of the package, evolution rules kick in only at first external publication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions