Skip to main content

Crate volas_core

Crate volas_core 

Source
Expand description

volas-core: the pure-Rust data model behind the volas Python package.

Storage primitives only (no pyo3, no numeric kernels, no directive engine) so it builds and unit-tests with plain cargo test and is reusable as a library.

Re-exports§

pub use buffer::Buffer;
pub use strbuf::StrBuffer;
pub use strbuf::StrBufferBuilder;
pub use column::BinOp;
pub use column::BoolOp;
pub use column::CmpOp;
pub use column::Column;
pub use column::CombineOp;
pub use column::Scalar;
pub use numeric::binary_supertype;
pub use numeric::fits;
pub use numeric::Numeric;
pub use validity::Bitmap;
pub use validity::Validity;
pub use dataframe::DataFrame;
pub use dtype::DType;
pub use error::Result;
pub use error::VolasError;
pub use index::Index;
pub use index::IndexKind;
pub use index::Label;
pub use series::Series;
pub use tz::Tz;

Modules§

buffer
Buffer<T>: a typed, contiguous value buffer that is either owned (Arc<Vec<T>>, the volas-computed case) or borrows foreign memory zero-copy (e.g. an Arrow / NumPy buffer kept alive by a guard).
column
Column: a single typed, contiguous buffer.
dataframe
DataFrame: ordered, named columns sharing a single row index.
datetime
Datetime parsing / formatting for the DatetimeIndex. Storage is UTC epoch-ns; per-frame display/matching tz lives in crate::tz.
dtype
Minimal dtype model for the OHLCV / numeric-time-series domain.
error
Error type for the volas core kernel.
fxhash
A fast hasher for the library’s INTERNAL string maps — the column-name index and the directive cache. It is not suitable for security-sensitive keys because these maps use internal column / directive names, never adversarial input, so the standard library’s SipHash (which trades speed for DoS resistance) is pure overhead. These maps are hit on the live-append hot path — every column_pos / column lookup and every directive refresh — where SipHash dominated the per-bar cost; FxHash (the hasher rustc itself uses) is several times faster on short keys.
index
Index: the row labels shared by a frame and the series drawn from it.
numeric
The numeric element types a column can compute over (f64, i64), behind a single trait so the cumulative / arithmetic / clip / select kernels are written once and monomorphised per dtype (zero-cost, no f64 round-trip).
series
Series: a single named column plus the (shared) index it was drawn from.
stats
Pure NaN-skipping numeric algorithms over f64 slices, shared by the Series / DataFrame numeric methods in the binding layer. They live here (not in the pyo3 binding) so they stay unit-tested and coverage-measured.
strbuf
StrBuffer: the Arrow-native columnar string layout — one contiguous UTF-8 Buffer<u8> plus an n+1 Buffer<i64> of offsets (Arrow LargeUtf8).
tz
Per-frame timezone for a DatetimeIndex.
validity
Validity: an optional, packed missing-value mask for nullable column variants (I64 / I32 / Bool).