lib-script · crate

kinogaki-script-exec

Libraryenvironment

lib-script's engine: a column (batch) interpreter in safe Rust.

Repository
lib-script (kinogaki/lib-script)
Folder
libs/lib-script/crates/exec
Source
12 files, 3,250 lines
Tests
17 files, 2,352 lines
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

lib-script's engine: a column (batch) interpreter in safe Rust.

Engine::compile checks a script against a host's schema, lowers it to the column IR, optimises it and assigns registers (cached by source and schema). Engine::run runs it over the host's elements in chunks of kinogaki_script_host::LANES, in parallel through lib-parallel. Every operation is total: errors become faults that report the line, column and lowest failing element, the same at any thread count, and nothing is written. mod@reference is a one-element-at-a-time interpreter of the checked program, the oracle the tests and the fuzzer compare against.

Depends on

CrateRepositoryAsWhat it is
kinogaki-mathlib-mathnormalKinogaki's vectors, points, matrices, quaternions and deterministic elementary functions.
kinogaki-parallellib-parallelnormalScoped parallel work over disjoint output slices, sized by cost.
kinogaki-script-hostlib-scriptnormalThe boundary between lib-script and a host.
kinogaki-script-irlib-scriptnormallib-script's column IR: typed SSA values (vectors as groups of scalar values) in structured regions; lowering from the checked program; uniform/varying analysis; optimisation; a verifier; and the fault table that maps instructions back to source spans.
kinogaki-script-liblib-scriptnormallib-script's function library.
kinogaki-script-syntaxlib-scriptnormallib-script's syntax: an indentation-aware lexer, a recovering parser and a syntax tree whose every node keeps the exact span of its text.
kinogaki-script-typeslib-scriptnormallib-script's front end after parsing: types, the host schema a context offers, the library catalog's signatures, the checker that builds the typed program, and completion and hover for the editor.

Third-party

None.

Used by

CrateRepositoryAsWhat it is
kinogaki-script-benchlib-scriptnormalBenchmarks on the test host, 1M elements: cargo run --release -p kinogaki-script-bench.
kinogaki-scriptingCore and the appnormalScripts over the standard values: lib-script's engine behind the SDK's ScriptEngine, and what a script sees of each value.

Modules

Public types and traits

At the crate root

Structs CompiledCompileOptionsEngineFaultLimitsReportRunOptions

Enums RunError

Re-exported from other crates

From kinogaki_script_ir FaultKind

By module: 9 public types and traits in 3 modules

engine CompiledCompileOptionsEngineReportRunOptions

fault FaultRunError

reference RefFaultRefOutput

Besides these, 4 public functions at module level.