Skip to main content

Crate pqty_fls

Crate pqty_fls 

Source
Expand description

Convert kpathsea .fls recorder output into an engine-neutral pqty.trace/v1 artifact.

The adapter reads INPUT records, resolves relative paths against recorder PWD records, and classifies every input through caller-supplied RootMapping values. The most specific matching root wins. Unmapped inputs and equally specific roots with conflicting scopes fail closed. OUTPUT records are ignored; a generated file that is later read appears as an INPUT and can be classified under an output root.

Paths are normalized lexically rather than canonicalized through the filesystem. This preserves the identity of a mounted package root whose files may be symlinks into pqty’s content-addressed store.

§Example

use std::path::Path;
use pqty_fls::{RootMapping, TraceScope, adapt_fls};

let working_directory = Path::new("/work/paper");
let roots = [
    RootMapping::new("/work/paper", TraceScope::Project, working_directory)?,
    RootMapping::new("/work/pqty-texmf", TraceScope::Package, working_directory)?,
    RootMapping::new("/work/paper/build", TraceScope::Output, working_directory)?,
];
let recorder = "\
PWD /work/paper
INPUT ./main.tex
INPUT /work/pqty-texmf/tex/latex/foo/foo.sty
";
let trace = adapt_fls(
    recorder,
    working_directory,
    &roots,
    Some("my-renderer/1.0".to_string()),
    None,
)?;
assert_eq!(trace.inputs.len(), 2);

Artifact Protocol v1 is the stable process-integration boundary. The Rust API follows this crate’s SemVer compatibility; while the major version is zero, minor releases may contain breaking Rust API changes.

Structs§

InputTrace
Engine-neutral input trace produced from a TeX recorder file.
ObservedInput
One input file observed by the TeX recorder.
RootMapping
A native filesystem root and the ownership scope assigned beneath it.

Enums§

AdapterError
Error returned while configuring or converting a recorder trace.
ResourceKind
Engine-neutral category inferred for a recorder input.
TraceScope
Ownership boundary assigned to a recorder input.

Constants§

TRACE_SCHEMA
Schema identifier emitted by adapt_fls.

Functions§

adapt_fls
Convert kpathsea recorder contents into a deterministic pqty input trace.