#tex #file-management #interface #search #ecosystem #kpathsea #libkpathsea

sys kpathsea_sys

Bindings to libkpathsea for efficient file management in the TeX ecosystem

3 releases

0.1.2 Nov 29, 2021
0.1.1 Mar 5, 2019
0.1.0 Mar 4, 2019

#23 in #file-management

40 downloads per month
Used in kpathsea

MIT/Apache

265KB
6.5K SLoC

Build Status API Documentation License crates.io

Rust interface and wrapper for the kpathsea library

Note: Currently there are no safety guarantees and the wrapper is not thread-safe (see #2)

Example

  let kpse = Kpaths::new()
    .expect("You need a properly setup tex toolchain (texlive/MikTeX/...) and kpathsea headers, to use this wrapper.");
  if let Some(path) = kpse.find_file("article.cls") {
    assert!(path.ends_with("article.cls"), "Successfully found the full path of article.cls");
  } else {
    panic!("A tex toolchain was found, but the search failed to detect a class file.");
  }

Dependencies