Skip to main content

Module dump_reader

Module dump_reader 

Source
Expand description

Reader for Rust-native kernel dump files Reader for Rust-native kernel dump files (produced by dump_writer.rs).

Loads a dump file produced by latexml_oxide --init=latex.ltx --dest=dump and replays the state assignments into the engine.

Loading policy: M and V entries replay with Perl-style global assignment semantics, matching Core/Dumper.pm’s I() / V() helpers. Runtime-state filters below are narrow exceptions for entries that should never be useful from a format dump.

Format: tab-separated lines: V\tKEY\tTYPE\tDATA — value assignment M\tKEY\tE\tCS\tNARGS\tFLAGS\tTOKENS — Expandable definition M\tKEY\tN — None meaning (undefined) M\tKEY\tT\tCC:TEXT — Token meaning (let-assignment) C\tCHAR\tCC\tVALUE — catcode assignment LC\tCHAR\tCH\tVALUE — lccode assignment UC\tCHAR\tCH\tVALUE — uccode assignment SC\tCHAR\tCH\tVALUE — sfcode assignment DC\tCHAR\tCH\tVALUE — delcode assignment MC\tCHAR\tCH\tVALUE — mathcode assignment

Functions§

collect_meaning_keys
Collect the control-sequence keys of every M (meaning) record in a dump, without applying anything to State.
flush_deferred_aliases
Replay any PA/MPA aliases that were deferred during dump load because their target was not yet defined. Call once after the post-dump definition pass (_constructs) has loaded. Returns (applied, skipped).
load_from_str
Load dump data from a string (used by the embedded LaTeX kernel dump module — latexml_engine/src/latex_dump.rs). Returns the number of entries loaded.
load_from_str_labeled
Load a dump, naming source (a real path or an <embedded TLyyyy> label) in the single dump_reader:loaded Info line. The dump wrappers (plain_dump/latex_dump) use this so there is exactly ONE “loaded N entries from ” message per dump — they no longer emit a second, redundant *_dump:loaded line of their own.
load_from_str_plain
Backwards-compat alias kept until call sites are migrated. Both entry points now load unconditionally, mirroring Perl I(...) / V(...) (Core/Dumper.pm) which call assign_internal('global') without filters.
load_native_dump
Load a Rust-native dump file into the current State. Returns the number of entries loaded.