Crate dazzle_core

Crate dazzle_core 

Source
Expand description

§Dazzle Core

Core library for Dazzle: Scheme interpreter (ported from OpenJade), DSSSL engine, and trait definitions for groves and backends.

§Architecture

Dazzle follows OpenJade’s clean separation:

  • grove: Trait definitions for document tree abstraction (like OpenJade’s grove/)
  • fot: Trait definitions for flow object tree backends (like OpenJade’s FOTBuilder)
  • scheme: Scheme interpreter (ported from OpenJade’s style/)
    • value: Scheme value types (ELObj equivalent)
    • parser: S-expression parser (SchemeParser.cxx equivalent)
    • interpreter: Evaluator and environment (Interpreter.cxx equivalent)
    • primitives: All 236 DSSSL primitives (primitive.cxx equivalent)
  • dsssl: DSSSL style engine (processing modes, rules, etc.)

§Design Principles

  1. Trait-based abstraction: Groves and backends are defined as traits, allowing multiple implementations without coupling to the interpreter.

  2. Faithful port: Preserves OpenJade’s proven design and performance optimizations (instruction-based evaluation, string interning, lazy node lists).

  3. 100% compatibility: All valid R4RS/DSSSL code that works in OpenJade works in Dazzle without modification.

Re-exports§

pub use fot::FotBuilder;
pub use grove::Grove;
pub use grove::Node;
pub use grove::NodeList;
pub use scheme::Environment;
pub use scheme::EvalError;
pub use scheme::EvalResult;
pub use scheme::Evaluator;
pub use scheme::PairData;
pub use scheme::Parser;
pub use scheme::Procedure;
pub use scheme::Value;

Modules§

fot
Flow Object Tree (FOT) builder trait
grove
Grove trait definitions
scheme
Scheme interpreter (ported from OpenJade)

Constants§

VERSION
Dazzle version