stet_core/lib.rs
1// stet - A PostScript Interpreter
2// Copyright (c) 2026 Scott Bowman
3// SPDX-License-Identifier: Apache-2.0 OR MIT
4
5//! Core type system, storage, tokenizer, and runtime context for the stet
6//! PostScript interpreter.
7//!
8//! This crate provides the PostScript VM building blocks: `PsObject` /
9//! `PsValue`, the interpreter [`Context`](context::Context) (operand /
10//! execution / dictionary stacks, graphics state, VM stores), the arena-
11//! backed `StringStore` / `ArrayStore` / `DictStore` with copy-on-write
12//! save/restore semantics, the `NameTable` name-interning system, the PS
13//! tokenizer, the [`OutputDevice`](device::OutputDevice) trait, file
14//! handles, and the error hierarchy.
15//!
16//! Most users should use the [`stet`](https://crates.io/crates/stet) facade
17//! crate rather than depending on `stet-core` directly. Pull this crate in
18//! only when you need to build alternative PS-interpreter tooling or
19//! implement a custom [`OutputDevice`](device::OutputDevice).
20//!
21//! See the [Architecture Guide](https://github.com/AndyCappDev/stet/blob/main/docs/ARCHITECTURE.md)
22//! for how this crate fits into the broader workspace.
23
24// ── Re-exports from stet-fonts ──────────────────────────────────────────────
25// These modules now live in stet-fonts but are re-exported here for backward
26// compatibility with existing downstream crates.
27pub use stet_fonts::agl;
28pub use stet_fonts::cff_parser;
29pub use stet_fonts::charstring;
30pub use stet_fonts::encoding;
31pub use stet_fonts::geometry;
32pub use stet_fonts::system_fonts;
33pub use stet_fonts::truetype;
34pub use stet_fonts::type1_parser;
35pub use stet_fonts::type2_charstring;
36
37// ── Re-exports from stet-graphics ───────────────────────────────────────────
38pub use stet_graphics::color;
39pub use stet_graphics::display_list;
40pub use stet_graphics::icc;
41pub use stet_graphics::mesh_shading;
42
43// ── Modules that remain in stet-core ────────────────────────────────────────
44pub mod array_store;
45pub mod binary_token;
46pub mod context;
47pub mod device;
48pub mod dict;
49pub mod dual_array_store;
50pub mod dual_dict_store;
51pub mod dual_string_store;
52pub mod entity_table;
53pub mod eps;
54pub mod error;
55pub mod file_store;
56pub mod font_loader;
57pub mod glyph_cache;
58pub mod graphics_state;
59pub mod name;
60pub mod object;
61pub mod pdfmark;
62pub mod save_stack;
63pub mod stack;
64pub mod string_store;
65pub mod system_font_loader;
66pub mod tokenizer;