Skip to main content

Module rt

Module rt 

Source
Expand description

Runtime data types shared by the VM and the compiler.

These live in the self-contained candela-vm crate so the runtime core (vm + data + gc + embed + artifact) links without the parser, compiler, or REPL. The candela compiler crate depends on this crate and re-exports these types (aliasing candela_vm::rt as crate::rt, etc.), so its own source keeps its import paths (compiler_data::Struct, type_system::DataType, expr::Span).

Structs§

DynamicLibFn
EnumType
A native tagged-union enum type. Its values are stored in the object pool like structs: element 0 of the pool entry is the variant tag (an int index into variants), and elements 1.. are the variant’s payload in order.
EnumVariant
ErrorCatch
FnValue
What a fn(...) type says about the functions that may reach it.
GcState
What the collector knows about the pools between two allocations.
GcStats
What the collector has done over a set of pools, and how large they are.
HostFnSig
Marshalling signature for a host function, indexed by the compiler’s FnSignature::id. types[0] is the return type; types[1..] are the argument types.
InstrSrc
PoolStats
How large one pool is.
Pools
Source
Span
A span of code in a Source’s contents.
Struct

Enums§

DataType
A resolved candela type. Attached to compiled artifacts (struct field types, dynamic-library / host function signatures) so the VM can marshal values.
LibraryOrigin
Where a recorded dylib spec is resolved from when an artifact loads.
TargetOs
Target operating system for dynamic-library filename resolution.

Functions§

argv_skip
The count set_argv_skip put in effect on this thread.
dylib_dirs
The directories set_dylib_dirs put in effect on this thread.
resolve_library_filename
Maps a candela dylib/import library spec to a concrete filename for os.
set_argv_skip
Says how many leading command-line arguments are the command’s own, and returns the count that was in effect.
set_dylib_dirs
Sets the directories a dylib import’s library is looked for in on this thread, and returns the ones that were in effect, so a caller can put them back.
std_lib_dir
The directory the standard library ships in: CANDELA_LIB_PATH when it is set, and libs/ beside the running executable otherwise, which is where the toolchain installs it next to candela and candela-vm.