Skip to main content

PRELUDE_MODULES

Constant PRELUDE_MODULES 

Source
pub const PRELUDE_MODULES: [&str; 5];
Expand description

The standard library modules every program has without an import.

They hold the methods of the builtin types and the Option and Result enums, each named by the path a library import resolves (std/list.cdl). They load after the program’s own files, so a program that declares its own Option, a variant called Some or a method of the same name finds its own first. A method nothing calls is never compiled, so a program pays for the ones it uses.