Runtime Library
The runtime library provides basic support code to implement several language features within the language itself instead of within the compiler. This allows the compiler code to stay relatively simple an to focus on implementing a small but expressive language core.
Every module, except for the core modules themselves will automatically have
an implicit private import of the core module generated by the compiler,
so that all symbols made available by the core module are automatically
available and are considered part of the language itself.
Note that the language runtime is a very thin layer with no external dependencies. It does not have any external dependencies, such as to the system's C standard library or to a threading library. Any such system dependent functionality is part of the standard library instead.
Modules
The runtime is split up into the following modules:
core: The core module imported into all source files that makes all other code modules availablecore.abort: Provides theabort()functioncore.array: Defines theArraySliceandSpantypes used to implement array slices (T[]) and arrays (T[size_t])core.associativearray: DefinesAssociativeArraytype used to implement associative arrays (T[U])core.attributes: Defines the core language attributes (e.g.@error)core.enums: Defines theEnumandTypedEnumstructs used to implementenumtypescore.error: Defines theErrorReturntype that is returned from@errorannotated functionscore.intrinsics: Makes compiler generated intrinsic functions availablecore.lifetime: Unsafe low-level functions for initializing and destroying values in untyped memorycore.operators: Defines all operators available for working with built-in typescore.option: Defines theOptiontype used to implementoptionalvaluescore.range: Defines the interfaces for rangescore.traits: Provides functions for querying type traitscore.types: Declares a number of additional standard types