Module tectonic::io

source ·
Expand description

Extensions to Tectonic’s pluggable I/O backend.

Re-exports§

Modules§

  • Helpers to tidy up the computation of digests in various places.
  • Code for locally caching compiled format files.
  • MemoryIo is an IoProvider that stores “files” in in-memory buffers.

Structs§

  • A wrapper for a fixed-size byte array representing a digest computed with the default implementation.
  • FilesystemIo is an I/O provider that reads, and optionally writes, files from a given root directory.
  • FilesystemPrimaryInputIo is an I/O provider that provides the TeX “primary input” file off of the filesystem. This can pretty much be achieved with Filesystem I/O, but we need the “primary input” formalism to decently support processing if stdin, and by doing things this way we can handle paths on Unix systems that can’t be converted to UTF-8.
  • GenuineStdoutIo provides a mechanism for the “stdout” output to actually go to the process’s stdout.
  • Input handles are basically Read objects with a few extras. We don’t require the standard io::Seek because we need to provide a dummy implementation for GZip streams, which we wouldn’t be allowed to do because both the trait and the target struct are outside of our crate.
  • An IoStack is an IoProvider that delegates to an ordered list of subordinate IoProviders. It also checks the order in which files are read and written to detect “circular” access patterns that indicate whether we need to run multiple passes of the TeX engine.
  • A handle for Tectonic output streams.

Enums§

  • What kind of source an input file ultimately came from. We keep track of this in order to be able to emit Makefile-style dependencies for input files. Right now, we only provide enough options to achieve this goal; we could add more.
  • A convenience type for file-open operations when “not found” needs to be handled specially.

Traits§

  • An extension to the basic Read trait supporting additional features needed for Tectonic’s I/O system.
  • A trait for types that can read or write files needed by the TeX engine.

Functions§

  • Normalize a TeX path if possible, otherwise return the original path.
  • Try to open a file on the fileystem, returning an OpenResult type allowing easy handling if the file was not found.