rune-chain-core
Core traits and types for the
rune-chainLLM orchestration framework.
What it does
rune-chain-core is the shared foundation for the rune-chain-* family of crates — a modern,
async-first Rust port of the LangChain concept. It defines the traits, types, and error variants
that all other rune-chain-* crates build on, without depending on any specific LLM provider.
Installation
[]
= "0.1"
= "0.1"
Usage
Implement [Chain] for any unit of LLM work:
use ;
use async_trait;
;
let chain = EchoChain;
let result = chain.invoke.await?;
println!;
Core abstractions
| Item | Description |
|---|---|
Chain |
Central trait — implement to create any LLM pipeline step |
Llm |
Provider-agnostic interface to any large language model |
Memory |
Pluggable conversation history |
Message / Role |
Typed turns: System, Human, Ai, Tool |
GenerateResult |
Generated text + optional token usage |
StreamData |
Incremental token chunk for streaming responses |
PromptArgs + prompt_args! |
Ergonomic input map for prompt templates |
ChainError / LlmError |
Structured errors with From conversion between them |
License
MIT