Crate kittycad_execution_plan

Crate kittycad_execution_plan 

Source
Expand description

A KittyCAD execution plan (KCEP) is a list of

  • KittyCAD API requests to make
  • Values to send in API requests
  • Values to assign from API responses
  • Computation to perform on values You can think of it as a domain-specific language for making KittyCAD API calls and using the results to make other API calls.

Re-exports§

pub use self::instruction::Instruction;
pub use self::instruction::InstructionKind;

Modules§

api_request
Instruction for running KittyCAD API requests.
constants
Defined constants and ability to create more.
import_files
Expose feature to import external geometry files. Instruction for importing a file. This will do all the file related operations, and return a kittycad_modeling_cmds::ImportFiles to be passed to Endpoint::ImportFiles.
instruction
KCVM aka KCEP instructions.
sketch_types
Types for sketching models.

Structs§

BinaryArithmetic
Instruction to perform arithmetic on values in memory.
ExecutionFailed
Executing the program failed.
ExecutionState
Current state of execution.
Memory
KCEP’s program memory. A flat, linear list of values.
Stack
A stack where values can be pushed/popped.
StaticMemoryInitializer
Helper wrapper around Memory. It lets you push static data into memory before the program runs.
UnaryArithmetic
Instruction to perform arithmetic on values in memory.

Enums§

BinaryOperation
Operations that can be applied to values in memory, requiring two operands.
Destination
Somewhere values can be written to.
ExecutionError
Errors that could occur when executing a KittyCAD execution plan.
Operand
Argument to an operation.
Operation
Operations that can be applied to values in memory.
UnaryOperation
Operations that can be applied to a value in memory, requiring one operand.

Functions§

execute
Execute the plan.
execute_time_travel
Execute the plan, returning the state at every moment of execution. Also return the index of the final instruction executed. This will be the last instruction if execution succeeded, but it might be earlier if execution had an error and quit.