Skip to main content

Crate el_core

Crate el_core 

Source
Expand description

el-core — the shared, dependency-free domain vocabulary for the Edge-Native LLM SDK.

Everything here is the ubiquitous language made into Rust types (docs/ddd/ubiquitous-language.md). It has no external dependencies so it compiles offline on any target, including wasm32 (ADR-008).

Cross-cutting invariants encoded here:

  • Content-free events (ADR-007): events::DomainEvent derives Copy, which makes the compiler reject any String/Vec/heap field — so no prompt or response content can ever ride on an event.
  • Air-gap by default (ADR-004): config::SessionConfig::hybrid_mode defaults to false; the only network seam is an explicit opt-in.
  • Unified LLM provider (ADR-010): provider::LlmProvider covers both local Candle and cloud frontier backends behind one trait.

Re-exports§

pub use config::SessionConfig;
pub use error::EdgeError;
pub use error::Result;
pub use events::DegradeReason;
pub use events::DomainEvent;
pub use events::EventEnvelope;
pub use ids::ModelId;
pub use ids::ModelVersion;
pub use ids::SessionId;
pub use provider::ChatMessage;
pub use provider::ChatRequest;
pub use provider::ChatResponse;
pub use provider::ChatRole;
pub use provider::ChatToken;
pub use provider::CredentialRef;
pub use provider::LlmProvider;
pub use value_objects::DeviceTarget;
pub use value_objects::ModelFormat;
pub use value_objects::Phase;
pub use value_objects::RuntimeKind;
pub use value_objects::SafetyMode;
pub use value_objects::SpeculationMode;
pub use value_objects::StopReason;
pub use value_objects::Token;

Modules§

config
Per-session configuration (immutable for the life of a session — ADR-001).
error
Domain error type.
events
Content-free domain events (ADR-007).
ids
Identifier value objects.
provider
Unified LLM provider abstraction (ADR-010).
value_objects
Core value objects from the ubiquitous language.