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
- Tier 1 (stable):
compile,compile_project,CompiledSchema,ProjectResult,CodegenBackend - Tier 2 (semi-stable): AST types, pipeline stages
- Tier 3 (internal): Lexer, parser – subject to change
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§
- Compile
Result - The result of the full compilation pipeline.
- Parse
Result - The result of parsing a Vexil source string.