Expand description
§vyre-libs - Category A composition ecosystem
vyre-libs composes foundation IR and primitive-owned kernels into reusable programs.
Almost every function is a pure Category A composition: it returns a
vyre_foundation::ir::Program built entirely from existing vyre IR primitives. The
sole exception is the math::atomic family, which are Category B
(Category::Intrinsic) because they require the backend to own the
Expr::Atomic target builder emitter arm (F-IR-35).
This is the ML/DSP/cryptographic ecosystem layer. Examples:
use vyre_libs::nn::linear::linear;
let program = linear(/* input_buf */ "x", /* weights */ "w", /* bias */ "b");
// `program` is a standard vyre_foundation::ir::Program you dispatch against any backend.§Domain ownership
Each public domain module owns its product-level compositions. A domain may move to a dedicated crate only through a clean public cutover that migrates every caller and removes the old path. This crate does not promise compatibility reexports or parallel old/new routes.
vyre-graph-stitch was deliberately omitted - “logical linker for
emitted graphs” is a vyre-foundation concern (IR composition),
not a library crate.
§Region wrapping
Every public composition wraps its body in a
vyre_foundation::ir::Node::Region with a stable generator name. The
optimizer treats Regions as atomic by default (preserves
debuggability + source-mapping); explicit inline passes can unroll
them. This is LLVM’s function-vs-always-inline split at IR level.
§Feature flags
Each domain lives behind a feature flag so minimal consumers pay for only what they use:
math(default) - linear algebra, scans, broadcastsnn(default, impliesmath) - neural-net primitivesmatching(default) - regex, DFA, substring, multi-patterncrypto(default) - hashing, MAC, checksums
Turn defaults off with default-features = false and cherry-pick
what you need.
Re-exports§
pub use tensor_ref::check_dtype;pub use tensor_ref::check_shape;pub use tensor_ref::check_unique_names;pub use tensor_ref::TensorRef;pub use tensor_ref::TensorRefError;pub use builder::check_tensors;pub use builder::BuildOptions;pub use descriptor::BufferDescriptor;pub use descriptor::ProgramDescriptor;pub use signatures::BOOL_OUTPUTS;pub use signatures::BYTES_TO_BYTES_INPUTS;pub use signatures::BYTES_TO_BYTES_OUTPUTS;pub use signatures::BYTES_TO_U32_OUTPUTS;pub use signatures::F32_F32_F32_INPUTS;pub use signatures::F32_F32_INPUTS;pub use signatures::F32_INPUTS;pub use signatures::F32_OUTPUTS;pub use signatures::I32_OUTPUTS;pub use signatures::U32_INPUTS;pub use signatures::U32_OUTPUTS;pub use signatures::U32_U32_INPUTS;
Modules§
- buffer_
names - Deterministic buffer naming for generic Cat-A builder aliases.
- builder
- Shared builder helpers every Cat-A composition reuses. Shared helpers used by the per-op Cat-A builders.
- contracts
- Operation contract presets used by catalog entries. Shared operation-contract presets for the standard catalog.
- decode
- Decode / decompression compositions - base64, hex, DEFLATE (stored),
more coming. Pairs with
vyre-libs::matching::dfain the fused decode→scan pipeline (Innovation I.1). Decode / decompression compositions for GPU-resident pipelines. - descriptor
ProgramDescriptor- introspection surface for Cat-A Programs.ProgramDescriptor- lightweight structural introspection of a Cat-A composition’s Program without running the full IR builder.- graph
- Packed AST walks (
ast_walk_*catalog ops). Graph / AST buffer compositions (docs/ops-catalog.md§1). - hash
- Hash / checksum dialect - FNV-1a-32, FNV-1a-64, CRC-32, Adler-32,
BLAKE3 compression. Consolidated from the former
vyre-libs::cryptomodule per Migration 3. Every op lives here as a pure Cat-A composition over existing IR primitives (no dedicated target builder emitter arm required, per the intrinsic-vs-library rule). Cat-A hash compositions. - intern
- Vector-widened string interning. CHD perfect hash over Tier-B label families - 60k+ function-name strings reduce to one subgroup-shuffle + one DRAM load on the GPU. Vector-widened string interning.
- logical
- Logical dialect - element-wise boolean composition. Elementwise logical operations (nand, nor).
- math
- Math dialect - linear algebra, scans, broadcasting. Linear algebra, scans, broadcasting, and atomic compositions.
- nn
- Neural-network dialect - activation, normalization, attention, linear. Neural-net primitives - activation, linear, normalization, attention, optimizer, quantization.
- operation_
catalog - Derived view over canonical library operation registrations. Registry-derived library operation catalog.
- parsing
- GPU parser infrastructure (Phase L3+): bracket matching, DFA
lexer driver, LR(1) table walker. Grammar tables are generated
host-side by
downstream analyzer-grammar-genand loaded as ReadOnly buffers. Thevyre-libsparsing and AST building domain library. - prelude
- Re-export the small set of vyre types every composition function
returns. Consumers can
use vyre_libs::prelude::*and get the API plus the types it returns. - range_
ordering - Domain-neutral byte-range ordering predicates. Domain-neutral byte-range ordering predicates.
- region
- Region builder - the shared helper every composition routes through. Substrate-neutral composition-region helpers.
- representation
- Representation sub-dialect: bit-packing and unpacking. Representation sub-dialect: bit-packing and unpacking.
- rule
- Rule-engine dialect - typed conditions, formulas, and program builder used by detection rule compilers. Rule-engine dialect: typed conditions, formulas, and program builder.
- scan
- Pattern-scanning dialect: neutral substring, DFA, NFA, and regex program builders plus immutable compilation artifacts. Substrate-neutral byte and text scan compositions.
- security
- Security / taint compositions for static program analysis.
Every op registers via
inventory::submit!and lives under a stable op id. The implementations compose graph and dataflow primitives so downstream analyzers lower to one production GPU-facing surface. Security / taint compositions for program-analysis pipelines. - signatures
- Type-signature constants shared across op definitions.
- tensor_
ref TensorRef- typed buffer-argument wrapper used by every Cat-A composition for dtype + shape + name-uniqueness validation.TensorRef- typed buffer-argument wrapper for Cat-A ops.- text
- Text-processing compositions for the GPU C parser pipeline (Phase L1+): byte classification, UTF-8 validation, line index. Text-processing compositions for the GPU C parser pipeline.
- visual
- GPU-accelerated visual effects - blur, shadow, filter chain,
gradient, compositing, and glass material. Tier 3 compositions
over
math::conv1d(Tier 2.5) and bare IR expressions. The Molten web engine’s visual effect substrate. Tier 3 visual compute compositions.