Where does tectonic put support files?

Where does tectonic put it’s support files when it has downloaded them?

On Linux, the files are stored in ~/.cache/Tectonic. On macOS, it should be ~/Library/Caches/Tectonic. Or, less concretely but more to the point for developers, Tectonic uses the user cache directory chosen by Rust’s app_dirs crate.

Within that directory, there are currently four subdirectories:

  • urls/ contains saved information mapping from bundle URLs to bundle SHA256 fingerprints
  • manifests/ contains saved information mapping from bundle SHA256 fingerprints to the SHA256 digests of individual files within each bundle, or negative entries indicating that the bundle does not contain files of a given name.
  • files/ contains actual file contents, addressed by their SHA256 digests, stored using a Git-like two-level directory hierarchy.
  • formats/ contains “format” files that store the initial state of the TeX engine when processing of a job begins. These are stored in the per-user cache, not in the bundles, because the contents of the file depend sensitively on the internal data structures of the engine.

(Apologies for bumping such an old thread… :slight_smile: )

Is there a way to point tectonic at a custom cache directory from the command line instead of using the default that app_dirs sets? From browsing the source it looks like it’s kind of implemented by tectonic/config.rs at master · tectonic-typesetting/tectonic · GitHub but that doesn’t seem to get exposed at the command line unless I’m missing something?