Skip to main content

Crate candela

Crate candela 

Source
Expand description

candela is the full toolchain: lexer, parser, type-checker, compiler, REPL, the Engine/Program embedding API, and the candela build subcommand.

The runtime core (the VM executor, bytecode/data types, GC, value marshalling, and the .cdlb load/run API) lives in the self-contained candela-vm crate. This crate depends on it (strictly candela -> candela-vm) and aliases its modules under crate:: so the compiler keeps its crate::data / crate::instr / crate::rt / crate::errors / crate::vm paths.

Modules§

compiler
parser

Structs§

Diagnostic
A structured compile/runtime error, produced instead of printing + exiting whenever a diagnostic sink is installed (see collect_diagnostic).
Engine
The persistent embedding entry point. Holds the table of registered host functions and compiles scripts into reusable Programs.
Program
A compiled candela program with resident interpreter state.
RuntimeProgram
A loaded, ready-to-run program image with owned runtime state.

Enums§

HostType
The type kinds that can cross the host boundary.
LoadError
Why a .cdlb artifact could not be loaded.
Value
A dynamically-typed value passed across the host/script boundary.

Traits§

FromHostValue
Extracts a Rust argument from a Value for a registered host closure.
IntoHostFn
Adapts a Rust closure into a registered host function.
IntoHostValue
Converts a host closure’s return value into a Value.

Functions§

build_bytecode
Compiles a .cdl source string to a .cdlb bytecode artifact.
collect_diagnostic
Runs f with a diagnostic sink installed.
load_program
Loads a .cdlb bytecode artifact into a runnable RuntimeProgram.
main