wasm-capability-core 0.2.0

This pattern's own default, zero-external-technology implementation: InMemoryCapabilityRegistry (SEA core/, local ADR-001).
Documentation

wasm-capability-core

TLDR: This pattern's own default, zero-external-technology implementation (SEA L2 core) — InMemoryCapabilityRegistry.

Starts empty, matching HashMap::new()/Vec::new() convention — this crate has no knowledge of any specific technology or consumer. A caller registers every named instance it needs (e.g. "grpc-egress", or a deployer-scoped instance like "grpc-egress:inventory-svc") without editing this crate's source. Not to be confused with this repo's own ADR-001, a different, later, local decision.

A technology-specific CapabilityEngine, ComponentValidator, or CapabilityDispatcher implementation belongs in its own downstream consumer crate instead — this crate wraps no external technology of its own, and has no dependency on, or knowledge of, any consumer.

Quick Start

use wasm_capability_contract::{CapabilityDescriptor, CapabilityProtocol, CapabilityRegistry};
use wasm_capability_core::InMemoryCapabilityRegistry;

let registry = InMemoryCapabilityRegistry::new()
    .register(
        "grpc-egress",
        CapabilityDescriptor {
            import_name: "grpc-egress",
            protocol: CapabilityProtocol::Grpc,
        },
    )
    .register(
        "grpc-egress:inventory-svc",
        CapabilityDescriptor {
            import_name: "grpc-egress",
            protocol: CapabilityProtocol::Grpc,
        },
    );

let descriptor = registry.descriptor("grpc-egress").expect("registered capability");
assert_eq!(descriptor.protocol, CapabilityProtocol::Grpc);

Depend on wasm-capability-contract (for CapabilityDescriptor/CapabilityRegistry) and this crate together.

Documentation

Document Description
Overview WHAT + WHY, including why this is built on svc-registry-adapter
Architecture Component diagram, crate boundaries

License

MIT OR Apache-2.0