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§
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.
- Runtime
Program - A loaded, ready-to-run program image with owned runtime state.
Enums§
- Host
Type - The type kinds that can cross the host boundary.
- Load
Error - Why a
.cdlbartifact could not be loaded. - Value
- A dynamically-typed value passed across the host/script boundary.
Traits§
- From
Host Value - Extracts a Rust argument from a
Valuefor a registered host closure. - Into
Host Fn - Adapts a Rust closure into a registered host function.
- Into
Host Value - Converts a host closure’s return value into a
Value.
Functions§
- build_
bytecode - Compiles a
.cdlsource string to a.cdlbbytecode artifact. - collect_
diagnostic - Runs
fwith a diagnostic sink installed. - load_
program - Loads a
.cdlbbytecode artifact into a runnableRuntimeProgram. - main