| Crates.io | allora-core |
| lib.rs | allora-core |
| version | 0.0.2 |
| created_at | 2025-11-26 04:27:41.799296+00 |
| updated_at | 2025-11-26 16:58:15.939592+00 |
| description | Core primitives for Allora: messages, exchanges, channels, processors, patterns (EIP) for Rust integration flows. |
| homepage | https://github.com/fialucci/allora |
| repository | https://github.com/fialucci/allora |
| max_upload_size | |
| id | 1950931 |
| size | 121,029 |
Core types and primitives for the Allora integration framework.
This crate provides the message model, exchanges, IDs, metadata, channels, and low-level EIP building blocks that
power the higher-level allora facade crate.
Most users should depend on allora directly; reach for allora-core when you need fine-grained control or want to
integrate Allora’s patterns into your own runtime or adapters.
allora-core?allora-core is the foundational library for Allora. It defines:
It deliberately avoids pulling in HTTP, YAML/runtime wiring, or proc macros.
Use allora-core directly when you:
allora facade and runtime featuresIf you just want to define services, wire channels, and run flows, prefer the allora crate instead.
Some of the most important concepts exposed by allora-core:
Message::from_text("...")in_msg) and optional outbound message, with correlation metadataChannel, PollableChannel, SubscribableChannel, CorrelationSupportDirectChannel (in-memory handoff), QueueChannel (buffered FIFO)use allora_core::message::{Exchange, Message};
fn main() {
let msg = Message::from_text("ping");
let ex = Exchange::new(msg);
assert_eq!(ex.in_msg.body_text(), Some("ping"));
}
use allora_core::{
channel::{PollableChannel, QueueChannel},
message::{Exchange, Message},
};
#[tokio::main]
async fn main() {
let ch = QueueChannel::with_id("demo");
ch.send(Exchange::new(Message::from_text("ping")))
.await
.expect("send should succeed");
let ex = ch
.try_receive()
.await
.expect("message should be available");
assert_eq!(ex.in_msg.body_text(), Some("ping"));
}
These examples show the raw primitives; higher-level routing, runtime wiring, and HTTP integration live in the other crates in the Allora workspace.
allora crateThe allora crate is the facade most users should depend on:
allora-coreallora-runtime), HTTP adapters (allora-http), and macros (allora-macros)If you start with allora and later need lower-level control (for example, writing a custom adapter, runtime, or
integration with another system), you can drop down to allora-core and use these primitives directly.
Check the allora crate for the high-level project status and roadmap.
Licensed under Apache-2.0. See the LICENSE file in the repository for details.