f449cb06f2
A second, closed construction channel beside the scalar bind seam (refs #271): ArgKind (Tz / TimeOfDay / Count — deliberately NOT ScalarKind, which stays invariant 4's streamed set), ArgSpec, ArgValue, ConstructionArg (verbatim strict-form strings, the id-bearing twin of BoundParam), ArgOpError, and an ArgsState on PrimitiveBuilder: pending(name, doc, specs, make) declares an arg-bearing recipe that is introspectable but not constructible; try_args validates strictly (exact IANA name, zero-padded HH:MM, plain positive decimal — the accepted form IS the canonical form, no normalization layer), then runs make and returns the configured builder. build() on a pending builder panics — the bind panic-contract twin; the data path always goes through try_args. chrono-tz enters aura-core for the typed Tz value (already a workspace dependency of four crates; typed values at the seam beat a validated-string re-parse split across two coupled sites). One test per ArgOpError variant plus strict-form refusal pins.
53 lines
2.0 KiB
Rust
53 lines
2.0 KiB
Rust
//! `aura-core` — the shared contract every aura component links against.
|
|
//!
|
|
//! This crate is the boundary forced by the cdylib hot-reload model: both the
|
|
//! engine and every hot-reloadable node cdylib depend on it, so it stays small
|
|
//! and stable.
|
|
//!
|
|
//! Delivered so far (cycle 0001 — the streaming substrate):
|
|
//!
|
|
//! - the four scalar base types streamed as SoA: [`Scalar`] / [`ScalarKind`] /
|
|
//! [`Timestamp`] (C7);
|
|
//! - [`Column`] — a fixed-capacity, bounded-lookback ring with financial
|
|
//! indexing (index 0 = newest) and a `run_count` freshness primitive (C5/C8),
|
|
//! read zero-copy through a [`Window`];
|
|
//! - [`AnyColumn`] — the type-erased edge over the four column kinds, with an
|
|
//! edge-time kind check ([`KindMismatch`]) (C7).
|
|
//!
|
|
//! Delivered in cycle 0002 — the node contract:
|
|
//!
|
|
//! - [`Node`] — the `lookbacks`/`eval` contract every node implements (C8); the
|
|
//! static signature ([`NodeSchema`] / [`PortSpec`] declaring input ports by kind
|
|
//! and the output record of [`FieldSpec`] columns; length 1 = scalar) is declared
|
|
//! on the node's [`PrimitiveBuilder`], pre-build;
|
|
//! - [`Ctx`] — the per-`eval` read-side: zero-copy, financial-indexed [`Window`]
|
|
//! access into each input (closing the cycle-0001 read-side gap on
|
|
//! [`AnyColumn`]).
|
|
//!
|
|
//! Still to come (subsequent cycles): the broker-independent
|
|
//! position-event output and downstream broker nodes (C10), and the run registry
|
|
//! (C18/C22).
|
|
|
|
mod any;
|
|
mod cell;
|
|
mod column;
|
|
mod ctx;
|
|
mod error;
|
|
mod node;
|
|
pub mod project;
|
|
mod scalar;
|
|
mod series_fold;
|
|
|
|
pub use any::AnyColumn;
|
|
pub use cell::Cell;
|
|
pub use column::{Column, Window};
|
|
pub use ctx::Ctx;
|
|
pub use error::KindMismatch;
|
|
pub use node::{
|
|
doc_gate, zip_params, ArgKind, ArgOpError, ArgSpec, ArgValue, BindOpError, BoundParam,
|
|
ConstructionArg, DocGateFault, FieldSpec, Firing, Node, NodeSchema, ParamSpec, PortSpec,
|
|
PrimitiveBuilder,
|
|
};
|
|
pub use scalar::{Scalar, ScalarKind, Timestamp};
|
|
pub use series_fold::SeriesFold;
|