Expand description
LOGOS Compilation Pipeline for CLI
Re-exports the compilation API from logicaffeine_compile.
This module provides access to the core compilation functions without
requiring a direct dependency on the compile crate. The key export is
compile_project, which transforms LOGOS source into Rust code.
§Architecture
The compilation pipeline is implemented in the logicaffeine_compile crate.
This module simply re-exports those types for convenience within the CLI.
§Example
use std::path::Path;
use logicaffeine_cli::compile::compile_project;
let rust_code = compile_project(Path::new("src/main.lg"))?;
println!("Generated {} bytes of Rust", rust_code.rust_code.len());Structs§
- Compile
Output - Full compilation output including generated Rust code and extracted dependencies.
- Crate
Dependency - A declared external crate dependency from a
## Requiresblock.
Enums§
- Compile
Error - Errors that can occur during the LOGOS compilation pipeline.
Functions§
- compile_
and_ run - Compile and run a LOGOS program end-to-end.
- compile_
file - Compile a LOGOS source file. For single-file compilation without dependencies.
- compile_
program_ full - Compile LOGOS source and return full output including dependency metadata.
- compile_
project - Compile a multi-file LOGOS project with dependency resolution.
- compile_
to_ dir - Compile LOGOS source and write output to a directory as a Cargo project.
- compile_
to_ rust - Compile LOGOS source to Rust source code.
- compile_
to_ rust_ checked - Compile LOGOS source to Rust with ownership checking enabled.
- copy_
runtime_ crates - Copy the runtime crates to the output directory. Copies logicaffeine_data and logicaffeine_system.
- interpret_
program - Interpret LOGOS source and return output as a string.