Skip to main content

stet_engine/
lib.rs

1// stet - A PostScript Interpreter
2// Copyright (c) 2026 Scott Bowman
3// SPDX-License-Identifier: Apache-2.0 OR MIT
4
5//! Execution engine for the stet PostScript interpreter.
6//!
7//! This crate is the eval loop that drives PostScript execution. It
8//! processes the execution stack one object at a time: executable names
9//! are looked up in the dictionary stack and dispatched, operators run,
10//! and procedures (`{…}`) are stepped through element-by-element. The
11//! three public entry points are:
12//!
13//! - [`eval::parse_and_exec`] — tokenise and execute a byte slice of
14//!   PostScript source.
15//! - [`eval::parse_and_exec_file`] — same, with a canonical file path
16//!   recorded so relative resource lookups work.
17//! - [`eval::exec_sync`] — synchronously execute an already-parsed
18//!   procedure object; used by operators such as `if`, `for`, `loop`.
19//!
20//! Most users should use the [`stet`](https://crates.io/crates/stet)
21//! facade crate rather than depending on `stet-engine` directly.
22
23pub mod eval;