Skip to main content

Crate varpulis_core

Crate varpulis_core 

Source
Expand description

§Varpulis Core

Foundational types and AST definitions for the VPL language.

This crate provides the core data structures used throughout the Varpulis streaming analytics engine, including:

  • AST (Abstract Syntax Tree): Complete representation of VPL programs
  • Type System: Type definitions for the language
  • Values: Runtime value representation
  • Source Spans: Location tracking for error reporting

§Features

  • Zero-copy parsing support via spans
  • Serialization support via serde
  • Comprehensive AST for all VPL constructs

§Modules

  • ast: Program structure, statements, expressions, and SASE patterns
  • types: Type system definitions (Int, Float, String, etc.)
  • value: Runtime values with type coercion and operations
  • span: Source location tracking for diagnostics

§Quick Start

use varpulis_core::{Program, Stmt, Value};

// Values are the runtime representation
let int_val = Value::Int(42);
let float_val = Value::Float(3.14);
let str_val = Value::Str("hello".into());

// Check value types
assert!(int_val.is_int());
assert!(float_val.is_float());

§AST Structure

A VPL program consists of statements:

  • StreamDecl: Stream definitions with operations
  • EventDecl: Event type definitions
  • PatternDecl: SASE+ pattern definitions
  • FnDecl: User-defined functions
  • Config: Configuration blocks

§See Also

Re-exports§

pub use event::Event;
pub use event::FieldKey;
pub use event::SharedEvent;
pub use span::Span;
pub use value::Value;
pub use ast::*;
pub use types::*;

Modules§

ast
Abstract Syntax Tree for VPL
event
Runtime event types
pagination
Pagination utilities for API list endpoints.
plan
Logical plan types for the Varpulis query planner
security
Shared security utilities for Varpulis.
span
Source location tracking
types
Type system for VPL
validate
Semantic validation for VPL programs.
value
Runtime values for VPL