Skip to main content

palladium/
lib.rs

1// Alan von Palladium Compiler Library
2// "The foundation where legends are built"
3
4pub mod ast;
5pub mod async_runtime;
6pub mod bootstrap;
7pub mod codegen;
8pub mod driver;
9pub mod effects;
10pub mod errors;
11pub mod lexer;
12pub mod lsp;
13pub mod macros;
14pub mod optimizer;
15pub mod ownership;
16pub mod package;
17pub mod parser;
18pub mod resolver;
19pub mod runtime;
20pub mod typeck;
21pub mod unsafe_ops;
22
23#[cfg(test)]
24mod tests;
25
26// Re-export main components
27pub use driver::Driver;
28pub use errors::{CompileError, Result};
29
30/// The main entry point for compilation
31pub fn compile(source: &str, filename: &str) -> Result<()> {
32    let driver = Driver::new();
33    driver.compile_string(source, filename)?;
34    Ok(())
35}
36
37/// Version information
38pub const VERSION: &str = env!("CARGO_PKG_VERSION");
39pub const VERSION_STRING: &str = concat!(
40    "Alan von Palladium Compiler v",
41    env!("CARGO_PKG_VERSION"),
42    "-alpha"
43);