lib-script · crate
kinogaki-script-host
The boundary between lib-script and a host.
- Repository
- lib-script (kinogaki/lib-script)
- Folder
libs/lib-script/crates/host- Source
- 9 files, 1,275 lines
- Tests
- 0 files, 0 lines
What it is
The boundary between lib-script and a host. A context (Mesh first; later Volume, SDF, splats, CAD) implements ScriptContext: it declares the names a script may use (kinogaki_script_types::Schema), feeds columns into registers chunk by chunk, runs its context functions as column kernels, and receives the written columns through a ScriptOutput and the geometry edits as an ordered queue of Edits.
table is an in-memory test host, so the engine is tested without any geometry library.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-script-types | lib-script | normal | lib-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
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-script-bench | lib-script | normal | Benchmarks on the test host, 1M elements: cargo run --release -p kinogaki-script-bench. |
kinogaki-script-exec | lib-script | normal | lib-script's engine: a column (batch) interpreter in safe Rust. |
kinogaki-script-ir | lib-script | normal | lib-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-lib | lib-script | normal | lib-script's function library. |
kinogaki-scripting | Core and the app | normal | Scripts over the standard values: lib-script's engine behind the SDK's ScriptEngine, and what a script sees of each value. |
Modules
contextThe host trait: what a context (Mesh, later Volume, SDF, ...) gives the engine.213 lineseditsThe deterministic edit queue: geometry edits that per-element code asks for are queued, then applied by the host after the run, in element order (and in program order within an element).45 lineslanesLanes: the engine works on chunks ofLANESelements at a time, each value held as a register of one component per lane (or one scalar, when it is the same on every lane).111 lineslistsPer-lane lists: each lane's list is a vector of component words (f64 bits, i64, or 0/1 for bools),compswords per item.147 linestableThe test host: an in-memory table of columns standing in for a mesh, so the engine is tested without a geometry kernel.219 linestable::commit(private)Applying a finished run to the tables: written columns, then edits.135 linestable::host(private)The table host's schema and itsScriptContextreads and context functions.315 linestable::output(private)Output columns of one run, handed out per chunk.75 linestable::functionsContext function indices of the table host.12 lines
Public types and traits
At the crate root
Traits OutputPartScriptContextScriptOutput
Structs DomainEditHostCallHostFaultListStoreWords
Enums ArgEditKindLanesLanesMutOperandSlot
By module: 23 public types and traits in 6 modules
context ArgDomainHostCallHostFaultOutputPartScriptContextScriptOutputSlot
edits EditEditKind
lanes LanesLanesMutOperand
lists ListStoreTooLongWords
table ColumnDataModeTableTableHost
table::output TableOutputTablePart
Besides these, 4 public functions at module level.
