inferd-engine 0.2.1

Backend trait and adapters for inferd. v0.1: mock + libllama (FFI). v0.2: cloud adapters.
Documentation

inferd-engine

Backend adapter crate. Defines the Backend trait that abstracts over different inference sources (llamafile subprocess today; Ollama / OpenAI / Bedrock / Anthropic / LiteLLM in v0.2).

Status: not yet implemented — starts in milestone M2.

Trait sketch

#[async_trait]
pub trait Backend: Send + Sync {
    fn name(&self) -> &str;
    fn ready(&self) -> bool;
    async fn generate(&self, req: GenerateRequest) -> Result<TokenStream>;
    async fn stop(&self, timeout: Duration) -> Result<()>;
}

See ../../docs/plan-v0.1.md for what each adapter implementation needs to satisfy.