Core and the app · crate
kinogaki-scripting
Scripts over the standard values: lib-script's engine behind the SDK's ScriptEngine, and what a script sees of each value.
- Repository
- Core and the app (kinogaki/studio-core)
- Folder
studio/core/scripting- Source
- 11 files, 2,539 lines
- Tests
- 2 files, 736 lines
What it is
Scripts over the standard values: lib-script's engine behind the SDK's ScriptEngine, and what a script sees of each value.
The language and its engine know no geometry. A binding (one module per standard value; geometry now) says what a script may name on a value and feeds its columns to the engine, chunk by chunk, and makes the new value of what the script wrote. A code node holds rows alone: it reaches this crate through the SDK (kinogaki_studio_api::script), and this is the only crate of core that names lib-script.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-script-exec | lib-script | normal | lib-script's engine: a column (batch) interpreter in safe Rust. |
kinogaki-script-host | lib-script | normal | The boundary between lib-script and a host. |
kinogaki-script-syntax | lib-script | normal | lib-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-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. |
kinogaki-studio-api | SDK | normal | Kinogaki Studio's headless plugin API. |
For its tests alone
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-cook | Core and the app | tests | Studio's core cooking engine, the same for every network kind (the owner's rule: the cooking DAG for nodes is core's). |
kinogaki-parallel | lib-parallel | tests | Scoped parallel work over disjoint output slices, sized by cost. |
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-core-package | Core and the app | normal | Core's own SDK package (kinogaki.core): what Studio holds whatever plugins are installed. |
Modules
facts(private)What code says of itself, read once per text: the host asks whenever a node's parameters change and at every cook.76 linesgeometry(private)What a script sees of aGeometryand how its writes come back.73 linesgeometry::commit(private)The new value of a finished run: written columns in place of the old ones, every other shared, then queued item writes, then queued edits through the SDK'sEditor, in element order.236 linesgeometry::functions(private)The functions a script calls on a value: its inputs' bounds, topology (core's index) and spatial lookups (geometry::nearest, built once per run when first asked), an Image input read at coordinates (the SDK'sSampler), and edits of its topology, queued in ...595 linesgeometry::host(private)lib-script's host trait over aGeometry: its names, its columns for one run, and its functions.362 linesgeometry::output(private)A run's written columns: made only for what it writes, handed out per chunk so chunks store in parallel, in the layout the value keeps them in.203 linesgeometry::read(private)Reading a value's columns into lanes: a run of consecutive elements (the element's fields) or gathered ones (inputs[1].points[j].P).289 linesgeometry::schema(private)The names a script may use over aGeometry, and where each one's values come from and its writes go.420 lineslanguage(private)lib-script as a code field reads it: colors from its lexer, completion, hover and problems from its checker against what the code runs over.76 linesvalues(private)Spare rows and script values, and lib-script's diagnostics as the SDK's.165 lines
Public types and traits
At the crate root
Structs Scripting
