Skip to main content

Module dump_codegen

Module dump_codegen 

Source
Expand description

Code generator: dump file โ†’ compiled Rust module Generate Rust source code from a kernel dump file.

Reads the text dump produced by dump_writer.rs and emits a .rs file containing typed static data tables. The compiler checks every entry at build time โ€” no runtime parsing, no text format errors possible.

Usage:

  1. Generate dump: latexml_oxide --init=latex.ltx --dest=/tmp/dump.tmp
  2. Generate Rust: dump_codegen::generate_rs("/tmp/dump.tmp", "latex_dump.rs")
  3. Place in latexml_package/src/engine/latex_dump.rs
  4. Load at runtime via latex_dump::load_definitions()

Functionsยง

generate_rs
Generate a Rust source file with typed static data tables from a text dump. Every entry is compiler-checked. Zero runtime parsing needed.