Crate seqc

Crate seqc 

Source
Expand description

Seq Compiler Library

Provides compilation from .seq source to LLVM IR and executable binaries.

§Extending the Compiler

External projects can extend the compiler with additional builtins using CompilerConfig:

use seqc::{CompilerConfig, ExternalBuiltin, compile_file_with_config};

let config = CompilerConfig::new()
    .with_builtin(ExternalBuiltin::new("my-op", "my_runtime_op"));

compile_file_with_config(source, output, false, &config)?;

Re-exports§

pub use ast::Program;
pub use codegen::CodeGen;
pub use config::CompilerConfig;
pub use config::ExternalBuiltin;
pub use lint::LintConfig;
pub use lint::LintDiagnostic;
pub use lint::Linter;
pub use lint::Severity;
pub use parser::Parser;
pub use resolver::ResolveResult;
pub use resolver::Resolver;
pub use resolver::check_collisions;
pub use resolver::check_union_collisions;
pub use resolver::find_stdlib;
pub use resource_lint::ProgramResourceAnalyzer;
pub use resource_lint::ResourceAnalyzer;
pub use typechecker::TypeChecker;
pub use types::Effect;
pub use types::StackType;
pub use types::Type;

Modules§

ast
Abstract Syntax Tree for Seq
builtins
Built-in word signatures for Seq
capture_analysis
Capture Analysis for Closures
codegen
LLVM IR Code Generation
config
Compiler configuration for extensibility
ffi
FFI (Foreign Function Interface) Support
lint
Lint Engine for Seq
parser
Simple parser for Seq syntax
resolver
Include Resolver for Seq
resource_lint
Resource Leak Detection (Phase 2a)
stdlib_embed
Embedded Standard Library
test_runner
Test runner for Seq test files
typechecker
Enhanced type checker for Seq with full type tracking
types
Type system for Seq
unification
Type unification for Seq

Functions§

compile_file
Compile a .seq source file to an executable
compile_file_with_config
Compile a .seq source file to an executable with custom configuration
compile_to_ir
Compile source string to LLVM IR string (for testing)
compile_to_ir_with_config
Compile source string to LLVM IR string with custom configuration