mathtex-portable-engine-generated 0.1.3

Machine generated portable TeX engine core for mathtex, translated from the TeX, eTeX and XeTeX sources
Documentation
//! Generated engine import-profile metadata.
//! Generated by `cargo run -p mathtex-web2c-import --bin patch_engine`.
//!
//! Data form of the import-profile specs: which source chain and pool produced
//! each profile, its capability set, and the host boundaries the importer is
//! permitted to cross. The runtime capability booleans live on
//! [`crate::runtime::EngineProfile`]; these constants record import provenance.

#![allow(dead_code)]

/// Engine kind an import profile targets.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ImportProfileKind {
    Tex,
    Etex,
    Xetex,
}

/// Capabilities a profile turns on over the shared TeX core.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ImportCapabilities {
    pub etex: bool,
    pub unicode_scalars: bool,
    pub unicode_math: bool,
    pub native_fonts: bool,
    pub output: bool,
}

/// Inclusive runtime `mem` array bounds for a profile.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ImportStateBounds {
    pub mem_min: i32,
    pub mem_top: i32,
}

/// One formalized engine import profile, as generated import metadata.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ImportProfile {
    /// Stable profile id (`"tex"` / `"etex"` / `"xetex"`).
    pub id: &'static str,
    /// Engine kind this profile imports.
    pub kind: ImportProfileKind,
    /// Ordered source chain: shared WEB source first, then change files.
    pub source_chain: &'static [&'static str],
    /// String pool file linked for this profile.
    pub pool_file: &'static str,
    /// Inclusive `mem` array bounds used at runtime.
    pub state_bounds: ImportStateBounds,
    /// Capabilities enabled over the shared core.
    pub capabilities: ImportCapabilities,
    /// Host-boundary identifiers this profile is permitted to cross.
    pub allowed_boundaries: &'static [&'static str],
}

/// All formalized engine import profiles, in `tex`/`etex`/`xetex` order.
pub static IMPORT_PROFILES: &[ImportProfile] = &[
    ImportProfile {
        id: "tex",
        kind: ImportProfileKind::Tex,
        source_chain: &[
            "tex.web",
            "tex.ch",
            "tex-binpool.ch",
        ],
        pool_file: "generated/web2c/tex/tex.pool",
        state_bounds: ImportStateBounds { mem_min: 0, mem_top: 19999999 },
        capabilities: ImportCapabilities { etex: false, unicode_scalars: false, unicode_math: false, native_fonts: false, output: true },
        allowed_boundaries: &[
        ],
    },
    ImportProfile {
        id: "etex",
        kind: ImportProfileKind::Etex,
        source_chain: &[
            "tex.web",
            "tex.ch",
            "tex-binpool.ch",
        ],
        pool_file: "generated/web2c/tex/tex.pool",
        state_bounds: ImportStateBounds { mem_min: 0, mem_top: 19999999 },
        capabilities: ImportCapabilities { etex: true, unicode_scalars: false, unicode_math: false, native_fonts: false, output: true },
        allowed_boundaries: &[
        ],
    },
    ImportProfile {
        id: "xetex",
        kind: ImportProfileKind::Xetex,
        source_chain: &[
            "tex.web",
            "tex.ch",
            "tex-binpool.ch",
            "xetexdir/tex.ch0",
            "tracingstacklevels.ch",
            "partoken-102.ch",
            "partoken.ch",
            "locnull-optimize.ch",
            "unbalanced-braces.ch",
            "showstream.ch",
            "xetexdir/xetex.ch",
            "xetexdir/char-warning-xetex.ch",
        ],
        pool_file: "generated/web2c/xetex/xetex.pool",
        state_bounds: ImportStateBounds { mem_min: 0, mem_top: 19999999 },
        capabilities: ImportCapabilities { etex: true, unicode_scalars: true, unicode_math: true, native_fonts: false, output: true },
        allowed_boundaries: &[
            "CFDictionaryRef",
            "GlyphAssembly",
            "UFILE",
            "aatfontget",
            "aatfontget1",
            "aatfontget2",
            "aatfontgetnamed",
            "aatfontgetnamed1",
            "aatprintfontname",
            "applymapping",
            "applytfmfontmapping",
            "checkfortfmfontmapping",
            "countpdffilepages",
            "free",
            "free_ot_assembly",
            "fputs",
            "get_native_glyph_italic_correction",
            "get_native_italic_correction",
            "getcreationdate",
            "getfiledump",
            "getfilemoddate",
            "getfilesize",
            "getfontcharrange",
            "getglyphbounds",
            "getmd5sum",
            "getnativecharheightdepth",
            "getnativecharht",
            "getnativecharic",
            "getnativecharsidebearings",
            "getnativecharwd",
            "grfontgetnamed",
            "grfontgetnamed1",
            "grprintfontname",
            "initstarttime",
            "loadtfmfontmapping",
            "otfontget",
            "otfontget1",
            "otfontget2",
            "otfontget3",
            "printglyphname",
            "set_cp_code",
            "setinputfileencoding",
            "u_close_file_or_pipe",
            "usingGraphite",
            "xmalloc",
            "xrealloc",
            "zbuildopentypeassembly",
            "znotaatfonterror",
            "znotaatgrfonterror",
        ],
    },
];