entelechyGenerated
Layer: interface · Lines of code: 3,082 · Integration test files: 11
Entelechy command line: check Kernels, run and watch Graph scenes
Description
Section titled “Description”The command line’s own commands over an entelechy-session session:
packages, rendering frames to files, replays, and scaffolding.
| Internal dependencies | entelechy-compiler, entelechy-formats, entelechy-graph, entelechy-ir, entelechy-kernel, entelechy-language, entelechy-protocol, entelechy-scene, entelechy-session |
| External dependencies | serde_json |
| Source | crates/interface/entelechy |
Modules
Section titled “Modules”| Name | Brief |
|---|---|
commands |
The command line’s commands and their flags, as data: entelechy prints its usage from this table and refuses, before a command runs, a flag the table does not give that command. |
help |
entelechy help: the protocol’s help (entelechy_protocol::help) with the command line’s own commands beside it, as text or, with --json, as the protocol answers. |
package |
Packages: a directory with a package.esn manifest, its Kernels, graph presets and assets, and its .entpkg archive: a magic line, the format version, then every file as its path and bytes, uncompressed. |
render |
Recording a session’s frames, and render, which steps a scene at a fixed rate for a count of frames and records them. |
scaffold |
entelechy new: a directory that runs: a Kernel, the scene placing it, a replay checking what it draws, and a README. Each kind passes its own replay on every backend. |
Structs
Section titled “Structs”| Name | Brief |
|---|---|
commands::Command |
One entelechy command. |
commands::Flag |
One flag of a command. |
render::Options |
How to render. |
render::Summary |
What a render wrote. |
render::Recorder |
A recording in progress: each evaluated frame’s picture written as it comes, its sound gathered and written once it is finished. |
Enumerations
Section titled “Enumerations”| Name | Brief |
|---|---|
render::Target |
Where a recording goes. |
scaffold::Kind |
What kind of scene to write. |
Functions
Section titled “Functions”| Function | Brief |
|---|---|
fn limit_flags() -> Vec<Flag> |
The limits entelechy_session::Limits reads. |
fn session_flags() -> Vec<Flag> |
The session’s flags entelechy_session::SessionOptions::read reads. |
fn commands() -> Vec<Command> |
Every command entelechy runs. |
fn command(name: &str) -> Option<Command> |
The command named name. |
fn usage() -> String |
Every command’s synopsis and explanatory text. |
fn answer(name: &str) -> Result<Value, Value> |
Every item named name, the protocol’s and the commands’. |
fn full() -> String |
The whole reference (entelechy_protocol::help::reference) with the command line’s commands. |
fn text(answer: &Value) -> String |
The items found, as a person reads them. |
fn pack(dir: &Path, out: &Path) -> Result<usize, String> |
Writes a package directory as one .entpkg file after checking its manifest. |
fn unpack(file: &Path, dir: &Path) -> Result<usize, String> |
Unpacks an .entpkg file into a new directory and checks its manifest. |
fn describe(dir: &Path) -> Result<String, String> |
A package’s id, needs, and counts of Kernel files, graph presets and other files, once its manifest’s Kernels compile and its presets read, each checked as entelechy check checks it. |
fn picture_name(index: u32) -> String |
The file name of frame index. |
fn render(session: &mut Session, options: &Options, progress: impl FnMut(u32, &Report)) -> Result<Summary, String> |
Renders options.frames frames into options.out, calling progress with each recorded frame’s index and report. |
fn picture_path(dir: &Path, index: u32) -> PathBuf |
The path of a directory’s frame index, for callers that read back. |
fn new_scene(dir: &Path, kind: Kind, name: &str) -> Result<Vec<String>, String> |
Writes a scene of this kind into dir, which must not hold one, and returns the files written in order. |
Constants
Section titled “Constants”| Name | Type | Value | Brief |
|---|---|---|---|
render::SOUND_NAME |
&str |
"sound.wav" |
The sound’s file name. |
Re-exports
Section titled “Re-exports”replay
commands::Command
Section titled “commands::Command”crates/interface/entelechy/src/commands.rs#L7
One entelechy command.
Properties
| Name | Type | Description |
|---|---|---|
name |
&'static str |
What follows entelechy: run. |
args |
&'static str |
The positional arguments and the flags a command requires, as the synopsis shows them; a flag named here is shown here alone. |
summary |
&'static str |
One sentence of what the command does. |
doc |
&'static str |
The explanatory text, in lines, as the usage shows it. |
flags |
Vec<Flag> |
Every flag the command reads. |
passes |
bool |
Whether the arguments go to the program beside entelechy, unchecked. |
Methods
| Function | Description |
|---|---|
fn synopsis(&self) -> String |
The command’s synopsis: entelechy run <scene.esn> [--out <file>]..., wrapped under its arguments. |
fn check(&self, args: &[String]) -> Result<(), String> |
Refuses a flag in args this command does not read; a flag’s value is not a flag. |
Implemented traits: Clone, Debug
commands::Flag
Section titled “commands::Flag”crates/interface/entelechy/src/commands.rs#L25
One flag of a command.
Properties
| Name | Type | Description |
|---|---|---|
name |
&'static str |
The flag itself: --out. |
value |
Option<&'static str> |
The value it takes, as the synopsis shows it; None for a switch. |
repeats |
bool |
Whether it may be given more than once. |
doc |
&'static str |
One line of what it does. |
Implemented traits: Clone, Debug
render::Options
Section titled “render::Options”crates/interface/entelechy/src/render.rs#L22
How to render.
Properties
| Name | Type | Description |
|---|---|---|
frames |
u32 |
How many frames. |
rate |
f32 |
Frames per second: frame i is at time i / rate. |
sound_rate |
u32 |
The sound clock Kernels read as rate(), and the WAV’s rate. |
out |
PathBuf |
Where the recording goes (see Target::of). |
window |
Option<([f32; 2], f32)> |
The window a scene sized by window() fills, and its scale. |
Implemented traits: Clone, Debug
render::Summary
Section titled “render::Summary”crates/interface/entelechy/src/render.rs#L37
What a render wrote.
Properties
| Name | Type | Description |
|---|---|---|
pictures |
u32 |
Frames written as pictures. |
size |
Option<(u32, u32)> |
The picture’s size, when there was one. |
sound_frames |
usize |
Sound frames written, over all the blocks. |
channels |
usize |
The sound’s channels, 1 or 2, when there was a sound. |
Implemented traits: Clone, Debug, Default, Eq, PartialEq, StructuralPartialEq
render::Recorder
Section titled “render::Recorder”crates/interface/entelechy/src/render.rs#L90
A recording in progress: each evaluated frame’s picture written as it comes, its sound gathered and written once it is finished.
Methods
| Function | Description |
|---|---|
fn new(target: Target, sound_rate: u32) -> Result<Self, String> |
A recording into target, its sound written at sound_rate; a directory is created if missing. |
fn frame(&mut self, session: &mut Session, report: &Report) -> Result<(), String> |
Records the frame report evaluated: its picture, into a directory, and its sound block. |
fn finish(self) -> Result<Summary, String> |
Writes the sound gathered, and says what was recorded. |
render::Target
Section titled “render::Target”crates/interface/entelechy/src/render.rs#L58
Where a recording goes.
Variants
| Name | Description |
|---|---|
Directory(PathBuf) |
A directory: each frame’s picture, and the sound as SOUND_NAME beside them. |
Sound(PathBuf) |
A WAV file: the sound alone. |
Methods
| Function | Description |
|---|---|
fn of(path: &Path) -> Self |
The target a path names: a .wav file, or else a directory. |
fn sound_path(&self) -> PathBuf |
Where the sound is written. |
Implemented traits: Clone, Debug, Eq, PartialEq, StructuralPartialEq
scaffold::Kind
Section titled “scaffold::Kind”crates/interface/entelechy/src/scaffold.rs#L9
What kind of scene to write.
Variants
| Name | Description |
|---|---|
Picture |
A picture over the window, drawn from the clock. |
Sound |
A voice and a drawing of what it sounds like. |
Game |
A grid of state the arrow keys move, drawn as cells. |
Methods
| Function | Description |
|---|---|
fn from_name(name: &str) -> Option<Self> |
The kind this name asks for. |
Implemented traits: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

