Skip to main content

Crate vexil_lang

Crate vexil_lang 

Source
Expand description

§vexil-lang

Compiler library for the Vexil schema definition language. Provides lexing, parsing, type checking, and compilation of .vexil schema files.

§Quick Start

use vexil_lang::compile;

let source = r#"
    namespace example
    message Point { x @0 : f32  y @1 : f32 }
"#;

let result = compile(source);
assert!(result.diagnostics.iter().all(|d| d.severity != vexil_lang::Severity::Error));

§API Tiers

Re-exports§

pub use codegen::CodegenBackend;
pub use codegen::CodegenError;
pub use ir::CompiledSchema;
pub use ir::ResolvedType;
pub use ir::TypeDef;
pub use ir::TypeId;
pub use ir::TypeRegistry;
pub use meta::meta_schema;
pub use meta::pack_schema;
pub use project::compile_project;
pub use project::ProjectResult;
pub use resolve::SchemaLoader;
pub use diagnostic::Diagnostic;
pub use diagnostic::Severity;

Modules§

ast
Abstract syntax tree types produced by the parser.
canonical
Canonical form serialisation (spec section 7).
codegen
Code generation backend trait and error types.
compat
Schema compatibility checker (spec section 10).
diagnostic
Diagnostic types for errors and warnings.
ir
Intermediate representation: compiled schema, type registry, and type definitions.
lexer
Lexer: tokenises Vexil source text.
lower
Lowering: transforms AST into IR.
meta
Meta-schemas for Vexil’s own IR types.
parser
Parser: builds an AST from a token stream.
project
Multi-file project compilation and import graph resolution.
remap
Type remapping utilities for cross-registry type cloning.
resolve
Schema loading abstraction (filesystem, in-memory).
span
Source span types for error reporting.
typeck
Type checker: validates IR and computes wire sizes.
validate
Semantic validation of parsed schemas.

Structs§

CompileResult
The result of the full compilation pipeline.
ParseResult
The result of parsing a Vexil source string.

Functions§

compile
Compile a Vexil source string through the full pipeline.
parse
Parse a Vexil schema source string.