Skip to main content

tl_compiler/
lib.rs

1// ThinkingLanguage — Bytecode Compiler & VM
2// Licensed under MIT OR Apache-2.0
3//
4// Phase 2: Compiles TL AST to register-based bytecode and executes it
5// in a virtual machine for 5-10x speedup over the tree-walking interpreter.
6
7// JIT runtime uses raw pointers by design (Cranelift FFI).
8// VmValue is a large enum by design (register-based VM needs it).
9#![allow(
10    clippy::large_enum_variant,
11    clippy::should_implement_trait,
12    clippy::type_complexity
13)]
14
15#[cfg(feature = "async-runtime")]
16pub mod async_runtime;
17pub mod chunk;
18pub mod compiler;
19#[cfg(feature = "native")]
20#[allow(
21    clippy::not_unsafe_ptr_arg_deref,
22    improper_ctypes_definitions,
23    dead_code
24)]
25pub mod jit;
26#[cfg(feature = "native")]
27#[allow(clippy::not_unsafe_ptr_arg_deref, improper_ctypes_definitions)]
28pub mod jit_runtime;
29pub mod module;
30pub mod opcode;
31#[cfg(feature = "python")]
32pub mod python;
33pub mod schema;
34pub mod security;
35pub mod value;
36pub mod vm;
37
38pub use chunk::Prototype;
39pub use compiler::{compile, compile_with_source};
40#[cfg(feature = "native")]
41pub use jit::JitCompiler;
42pub use value::VmValue;
43pub use vm::Vm;