Skip to main content

Crate ling

Crate ling 

Source

Re-exports§

pub use core::CompilerConfig;
pub use core::LingCompiler;
pub use core::OptimizationLevel;
pub use lexicon::CanonicalToken;
pub use lexicon::Lexicon;
pub use lexicon::LexiconRegistry;
pub use polyglot::normalize_source;
pub use polyglot::ScriptDetector;
pub use ling_audio;

Modules§

astviz
borrowck
codegen
convert
ling convert <asset> [-o out.ling] [--no-compression]
core
diag
entry
gfx
lexer
lexicon
mir
parser
polyglot
runtime
semantic
utils
visualize

Constants§

VERSION

Functions§

detect_language
Detect the primary human language used for keywords in a Ling source file.
run
Run a Ling source string through the interpreter. Lexes → parses → executes the start binding.
run_file
Run with an optional source directory for relative use imports.
run_jit
Run concatenated source on the Cranelift JIT backend, resolving use imports against source_dir. This is the interpreter-free entry point for embedders (e.g. the game launcher). Cranelift-skipped oversized functions still execute through the primed fallback interpreter, so behaviour matches the tree-walker. A program with no entry, a parse error, or a pre-execution codegen failure falls back to run_named; a mid-run failure is returned as a rendered diagnostic without retrying (output may already be on screen).
run_named
Run with an optional source directory and the source file name (used to label diagnostics). Parse and runtime errors are returned as fully-rendered, colored, localized diagnostics (see diag).
unpack_resources
Self-extract resources packed into the executable by ling build --pack.