Expand description
Runtime module for Shape execution
This module contains the pattern matching engine, query executor, and evaluation logic for the Shape language.
Shape is a general-purpose scientific computing language for high-speed time-series analysis. The runtime is domain-agnostic - all domain-specific logic (finance, IoT, sensors, etc.) belongs in stdlib modules.
Re-exports§
pub use alerts::Alert;pub use alerts::AlertRouter;pub use alerts::AlertSeverity;pub use alerts::AlertSink;pub use context::DataLoadMode;pub use context::ExecutionContext as Context;pub use data::DataFrame;pub use data::OwnedDataRow as RowValue;pub use event_queue::EventQueue;pub use event_queue::MemoryEventQueue;pub use event_queue::QueuedEvent;pub use event_queue::SuspensionState;pub use event_queue::WaitCondition;pub use event_queue::create_event_queue;pub use extensions::ExtensionCapability;pub use extensions::ExtensionDataSource;pub use extensions::ExtensionLoader;pub use extensions::ExtensionOutputSink;pub use extensions::LoadedExtension;pub use extensions::ParsedOutputField;pub use extensions::ParsedOutputSchema;pub use extensions::ParsedQueryParam;pub use extensions::ParsedQuerySchema;pub use extensions_config::ExtensionEntry as GlobalExtensionEntry;pub use extensions_config::ExtensionsConfig as GlobalExtensionsConfig;pub use extensions_config::load_extensions_config;pub use extensions_config::load_extensions_config_from;pub use hashing::HashDigest;pub use hashing::combine_hashes;pub use hashing::hash_bytes;pub use hashing::hash_file;pub use hashing::hash_string;pub use intrinsics::IntrinsicFn;pub use intrinsics::IntrinsicsRegistry;pub use join_executor::JoinExecutor;pub use leakage::LeakageDetector;pub use leakage::LeakageReport;pub use leakage::LeakageSeverity;pub use leakage::LeakageType;pub use leakage::LeakageWarning;pub use module_bindings::ModuleBindingRegistry;pub use module_exports::FrameInfo;pub use module_exports::ModuleContext;pub use module_exports::ModuleExportRegistry;pub use module_exports::ModuleExports;pub use module_exports::ModuleFn;pub use module_exports::VmStateAccessor;pub use multiple_testing::MultipleTestingGuard;pub use multiple_testing::MultipleTestingStats;pub use multiple_testing::WarningLevel;pub use progress::LoadPhase;pub use progress::ProgressEvent;pub use progress::ProgressGranularity;pub use progress::ProgressHandle;pub use progress::ProgressRegistry;pub use query_result::AlertResult;pub use query_result::QueryResult;pub use query_result::QueryType;pub use stream_executor::StreamEvent;pub use stream_executor::StreamExecutor;pub use stream_executor::StreamState;pub use sync_bridge::SyncDataProvider;pub use type_schema::FieldDef;pub use type_schema::FieldType;pub use type_schema::SchemaId;pub use type_schema::TypeSchema;pub use type_schema::TypeSchemaBuilder;pub use type_schema::TypeSchemaRegistry;pub use window_executor::WindowExecutor;pub use wire_conversion::nb_extract_typed_value;pub use wire_conversion::nb_to_envelope;pub use wire_conversion::nb_to_wire;pub use wire_conversion::nb_typed_value_to_envelope;pub use wire_conversion::wire_to_nb;
Modules§
- alerts
- Alert Pipeline System
- annotation_
context - Annotation context and decorator registry
- arrow_c
- Arrow C Data Interface import helpers.
- ast_
extensions - Extensions to the AST for flexible query execution
- binary_
reader - Binary reader for converting binary columnar data to DataTable
- blob_
prefetch - Speculative prefetch for content-addressed function blobs.
- blob_
store - Blob store abstraction for content-addressed function blobs.
- blob_
wire_ format - Cross-language wire format for FunctionBlob serialization.
- builtin_
metadata - Builtin function metadata for LSP introspection
- closure
- Closure support for Shape functions
- code_
search - Structural code search over content-addressed function blobs.
- columnar_
aggregations - SIMD-optimized aggregations for columnar object series
- const_
eval - Const evaluation for annotation metadata() handlers
- content_
builders - Content namespace builder functions.
- content_
dispatch - Content trait dispatch — render any ValueWord value as a ContentNode.
- content_
methods - Content method dispatch for ContentNode instance methods.
- content_
renderer - ContentRenderer trait for rendering ContentNode to various output formats.
- context
- Execution context for Shape runtime
- crypto
- Cryptographic utilities for module signing and trust verification.
- data
- Generic data types for Shape
- dependency_
resolver - Dependency resolution from shape.toml
- distributed_
gc - Distributed garbage collection for content-addressed function blobs.
- engine
- Shape Engine - Unified execution interface
- error
- Unified error handling for Shape
- event_
queue - Platform-agnostic event queue for async operations
- execution_
proof - Proof of execution for content-addressed functions.
- extension_
context - Context-aware extension discovery and module-artifact registration.
- extensions
- Extension system surface for Shape runtime.
- extensions_
config - Global extension configuration loading from TOML.
- frontmatter
- Front-matter parser for Shape scripts
- fuzzy
- Fuzzy matching algorithms for pattern recognition
- fuzzy_
property - Property-specific fuzzy matching for Shape
- hashing
- SHA256 hashing utilities for reproducibility artifacts
- intrinsics
- High-performance intrinsic functions for Shape
- join_
executor - JOIN execution engine
- leakage
- Lookahead bias and data leakage detection
- lookahead_
guard - Data access validation for time-series processing
- metadata
- Language metadata API for LSP and tooling
- module_
bindings - Module Binding Registry - Single source of truth for module binding values
- module_
exports - Runtime module export bindings for Shape extensions.
- module_
loader - Module loading and management for Shape
- module_
manifest - Module manifest for content-addressed module distribution.
- multi_
table - Multi-series data alignment and analysis module
- multiple_
testing - Multiple testing corrections and warnings
- output_
adapter - Output adapter trait for handling print() results
- package_
bundle - Package bundle format for distributable .shapec files
- package_
lock - Unified
shape.lockmodel for deterministic dependency resolution and compile-time artifact caching. - pattern_
library - Pattern library stub for semantic analysis
- pattern_
state_ machine - Generic pattern state machine for sequence detection
- plugins
- Plugin System for Shape
- progress
- Progress reporting system for data loading operations
- project
- Project root detection and shape.toml configuration
- provider_
registry - Provider registry for managing named data providers
- query_
builder - Query plan and SQL generation for data source pushdown.
- query_
executor - High-level query execution API for Shape
- query_
result - Enhanced query result types that support both analysis and simulations
- renderers
- Content renderers for various output targets.
- schema_
cache - Data-source schema cache backed by unified
shape.lockartifacts. - schema_
inference - Schema inference for data files.
- semantic
- Semantic analysis module for Shape
- simd_
comparisons - SIMD-accelerated comparison operations for series
- simd_
forward_ fill - SIMD-optimized forward-fill operations for table alignment
- simd_
i64 - SIMD-style i64 operations for integer-typed arrays.
- simd_
rolling - SIMD-accelerated rolling window operations
- simd_
statistics - SIMD-accelerated statistical operations
- simulation
- Generic Simulation Engine
- snapshot
- Snapshotting and resumability support
- state_
diff - Content-addressed state diffing for distributed Shape.
- statistics
- Advanced statistics module for Shape pattern analysis
- stdlib
- Standard library modules for the Shape runtime.
- stdlib_
io - Native
iomodule for file system and network operations. - stdlib_
metadata - Stdlib metadata extractor for LSP introspection
- stdlib_
time - Native
timemodule for precision timing. - stream_
executor - Stream executor for real-time data processing
- sync_
bridge - Async/Sync bridge for Shape runtime
- time_
window - Time window support for Shape
- timeframe_
utils - Utilities for timeframe operations and timestamp generation
- type_
mapping - Type mapping system for validating DataFrame structure
- type_
methods - Type method registry for storing user-defined methods on types
- type_
schema - Type Schema Registry for JIT Type Specialization
- type_
system - Shape Type System
- visitor
- AST Visitor trait and walk functions for Shape.
- window_
executor - Window function execution engine
- window_
manager - Generic window manager for time-series aggregations
- wire_
conversion - Conversion between runtime values and wire format.
Structs§
- Aligned
Vec - A vector with SIMD-aligned memory allocation
- Runtime
- The main runtime engine for Shape
- Source
Location - Source location information for error reporting
- Value
- An 8-byte value word for the VM stack (NaN-boxed encoding).
Enums§
- Shape
Error - The main error type for Shape operations
Type Aliases§
- Result
- Result type alias for Shape operations