commit
f392f760bb
|
@ -2633,6 +2633,7 @@ dependencies = [
|
|||
"tectonic_xetex_layout",
|
||||
"tempfile",
|
||||
"termcolor",
|
||||
"time",
|
||||
"tokio",
|
||||
"toml",
|
||||
"url",
|
||||
|
@ -2934,9 +2935,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.34"
|
||||
version = "0.3.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
|
||||
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa",
|
||||
|
@ -2957,9 +2958,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
|||
|
||||
[[package]]
|
||||
name = "time-macros"
|
||||
version = "0.2.17"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
|
||||
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
|
||||
dependencies = [
|
||||
"num-conv",
|
||||
"time-core",
|
||||
|
|
37
Cargo.toml
37
Cargo.toml
|
@ -16,17 +16,14 @@ documentation = "https://docs.rs/tectonic"
|
|||
repository = "https://github.com/tectonic-typesetting/tectonic/"
|
||||
readme = "CARGO_README.md"
|
||||
keywords = ["tex", "latex", "typesetting", "font"]
|
||||
categories = [
|
||||
"command-line-interface",
|
||||
"parser-implementations",
|
||||
"rendering",
|
||||
"science",
|
||||
"text-processing",
|
||||
]
|
||||
categories = ["command-line-interface", "parser-implementations", "rendering", "science", "text-processing"]
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
exclude = ["/dist/", "/reference_sources/"]
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(backtrace)'] }
|
||||
|
||||
[badges]
|
||||
travis-ci = { repository = "tectonic-typesetting/tectonic" }
|
||||
codecov = { repository = "tectonic-typesetting/tectonic", service = "github" }
|
||||
|
@ -97,6 +94,7 @@ watchexec-filterer-globset = "3.0"
|
|||
watchexec-signals = "2.0"
|
||||
watchexec-supervisor = "1.0"
|
||||
zip = { version = "^0.6", default-features = false, features = ["deflate"] }
|
||||
time = "0.3.36"
|
||||
|
||||
[features]
|
||||
default = ["geturl-reqwest", "serialization"]
|
||||
|
@ -114,10 +112,7 @@ external-harfbuzz = ["tectonic_engine_xetex/external-harfbuzz"]
|
|||
geturl-curl = ["tectonic_bundles/geturl-curl", "tectonic_geturl/curl"]
|
||||
geturl-reqwest = ["tectonic_bundles/geturl-reqwest", "tectonic_geturl/reqwest"]
|
||||
|
||||
native-tls-vendored = [
|
||||
"tectonic_bundles/native-tls-vendored",
|
||||
"tectonic_geturl/native-tls-vendored",
|
||||
]
|
||||
native-tls-vendored = ["tectonic_bundles/native-tls-vendored", "tectonic_geturl/native-tls-vendored"]
|
||||
|
||||
# developer feature to compile with the necessary flags for profiling tectonic.
|
||||
profile = []
|
||||
|
@ -141,23 +136,9 @@ overlay-triplets-path = "dist/vcpkg-triplets"
|
|||
# guidance if they might need to set $VCPKGRS_TRIPLET.
|
||||
[package.metadata.vcpkg.target]
|
||||
x86_64-apple-darwin = { install = ["freetype", "harfbuzz[graphite2]", "icu"] }
|
||||
aarch64-apple-darwin = { triplet = "arm64-osx", install = [
|
||||
"freetype",
|
||||
"harfbuzz[graphite2]",
|
||||
"icu",
|
||||
] }
|
||||
x86_64-unknown-linux-gnu = { install = [
|
||||
"fontconfig",
|
||||
"freetype",
|
||||
"harfbuzz[graphite2]",
|
||||
"icu",
|
||||
] }
|
||||
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-release", install = [
|
||||
"fontconfig",
|
||||
"freetype",
|
||||
"harfbuzz[graphite2]",
|
||||
"icu",
|
||||
] }
|
||||
aarch64-apple-darwin = { triplet = "arm64-osx", install = ["freetype", "harfbuzz[graphite2]", "icu"] }
|
||||
x86_64-unknown-linux-gnu = { install = ["fontconfig", "freetype", "harfbuzz[graphite2]", "icu"] }
|
||||
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-release", install = ["fontconfig", "freetype", "harfbuzz[graphite2]", "icu"] }
|
||||
|
||||
[package.metadata.internal_dep_versions]
|
||||
tectonic_bridge_core = "thiscommit:2023-06-11:PvhF7YB"
|
||||
|
|
|
@ -460,7 +460,7 @@ impl<CB: CacheBackend> CachingBundle<CB> {
|
|||
// If a filename contains newline characters, it will mess up our
|
||||
// line-based manifest format. Be paranoid and refuse to record such
|
||||
// filenames.
|
||||
if !name.contains(|c| c == '\n' || c == '\r') {
|
||||
if !name.contains(['\n', '\r']) {
|
||||
writeln!(man, "{name} {length} {digest_text}")?;
|
||||
}
|
||||
|
||||
|
@ -515,9 +515,7 @@ impl<CB: CacheBackend> CachingBundle<CB> {
|
|||
// giving incorrect results if we pulled files out of the cache
|
||||
// before this invocation. Rewrite the digest file so that next time
|
||||
// we'll start afresh, then bail.
|
||||
file_create_write(&self.digest_path, |f| {
|
||||
writeln!(f, "{}", pull_data.digest.to_string())
|
||||
})?;
|
||||
file_create_write(&self.digest_path, |f| writeln!(f, "{}", pull_data.digest))?;
|
||||
bail!("backend digest changed; rerun tectonic to use updated information");
|
||||
}
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ impl Document {
|
|||
tried_src_path = true;
|
||||
|
||||
if let Some(s) = t.to_str() {
|
||||
name = s.to_owned();
|
||||
s.clone_into(&mut name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ impl Document {
|
|||
|
||||
if let Some(Component::Normal(t)) = full_path.components().next_back() {
|
||||
if let Some(s) = t.to_str() {
|
||||
name = s.to_owned();
|
||||
s.clone_into(&mut name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ pub(crate) fn create_output_path(
|
|||
|
||||
for piece in dest_path.split('/') {
|
||||
if let Some(out_path) = out_path.as_mut() {
|
||||
match std::fs::create_dir(&out_path) {
|
||||
match std::fs::create_dir(out_path.as_path()) {
|
||||
Ok(_) => {}
|
||||
Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => {}
|
||||
Err(e) => {
|
||||
|
|
|
@ -426,9 +426,10 @@ impl FontFileData {
|
|||
|
||||
if let Some(out_path) = out_path.as_mut() {
|
||||
out_path.push(rel_path);
|
||||
let display_path = out_path.clone();
|
||||
atry!(
|
||||
std::fs::write(&out_path, &self.buffer);
|
||||
["cannot write output file `{}`", out_path.display()]
|
||||
std::fs::write(out_path, &self.buffer);
|
||||
["cannot write output file `{}`", display_path.display()]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -490,9 +491,10 @@ impl FontFileData {
|
|||
|
||||
out_path.pop();
|
||||
out_path.push(&varname);
|
||||
let display_path = out_path.clone();
|
||||
atry!(
|
||||
std::fs::write(&out_path, &buffer);
|
||||
["cannot write output file `{}`", out_path.display()]
|
||||
std::fs::write(out_path, &buffer);
|
||||
["cannot write output file `{}`", display_path.display()]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -197,13 +197,13 @@ impl FontEnsemble {
|
|||
// Update the info records for the relevant fonts to capture the
|
||||
// established relationship.
|
||||
|
||||
self.font_files[regular].family_name = name.clone();
|
||||
self.font_files[regular].family_name.clone_from(&name);
|
||||
self.font_files[regular].family_relation = FamilyRelativeFontId::Regular;
|
||||
self.font_files[bold].family_name = name.clone();
|
||||
self.font_files[bold].family_name.clone_from(&name);
|
||||
self.font_files[bold].family_relation = FamilyRelativeFontId::Bold;
|
||||
self.font_files[italic].family_name = name.clone();
|
||||
self.font_files[italic].family_name.clone_from(&name);
|
||||
self.font_files[italic].family_relation = FamilyRelativeFontId::Italic;
|
||||
self.font_files[bold_italic].family_name = name.clone();
|
||||
self.font_files[bold_italic].family_name.clone_from(&name);
|
||||
self.font_files[bold_italic].family_relation = FamilyRelativeFontId::BoldItalic;
|
||||
|
||||
self.font_families.insert(
|
||||
|
|
|
@ -167,12 +167,12 @@ impl InitializationState {
|
|||
}
|
||||
|
||||
fn handle_set_template(&mut self, texpath: &str, _common: &mut Common) -> Result<()> {
|
||||
self.next_template_path = texpath.to_owned();
|
||||
texpath.clone_into(&mut self.next_template_path);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_set_output_path(&mut self, texpath: &str, _common: &mut Common) -> Result<()> {
|
||||
self.next_output_path = texpath.to_owned();
|
||||
texpath.clone_into(&mut self.next_output_path);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ fn main() {
|
|||
let profile_target_requires_frame_pointer: bool =
|
||||
target_cfg!(not(all(target_os = "linux", target_arch = "x86_64")));
|
||||
|
||||
#[allow(unexpected_cfgs)]
|
||||
const PROFILE_BUILD_ENABLED: bool = cfg!(feature = "profile");
|
||||
|
||||
let profile_config = |cfg: &mut cc::Build| {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//! Helpers to tidy up the computation of digests in various places.
|
||||
|
||||
use std::{
|
||||
fs,
|
||||
fmt, fs,
|
||||
path::{Path, PathBuf},
|
||||
str::FromStr,
|
||||
};
|
||||
|
@ -103,9 +103,9 @@ impl DigestData {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToString for DigestData {
|
||||
fn to_string(&self) -> String {
|
||||
bytes_to_hex(&self.0)
|
||||
impl fmt::Display for DigestData {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", bytes_to_hex(&self.0))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1229,7 +1229,7 @@ impl<'a, T: XdvEvents> Cursor<'a, T> {
|
|||
return Err(InternalError::NeedMoreData);
|
||||
}
|
||||
|
||||
let rv = unsafe { mem::transmute(self.buf[0]) };
|
||||
let rv = unsafe { mem::transmute::<u8, i8>(self.buf[0]) };
|
||||
self.buf = &self.buf[1..];
|
||||
self.offset += 1;
|
||||
Ok(rv)
|
||||
|
|
|
@ -86,7 +86,7 @@ fn main() {
|
|||
let mut cppcfg = cc::Build::new();
|
||||
|
||||
let cppflags = [
|
||||
"-std=c++14",
|
||||
"-std=c++17",
|
||||
"-Wall",
|
||||
"-Wdate-time",
|
||||
"-Wendif-labels",
|
||||
|
|
|
@ -1132,7 +1132,7 @@ impl ProcessingSessionBuilder {
|
|||
}
|
||||
};
|
||||
|
||||
filesystem_root = parent.clone();
|
||||
filesystem_root.clone_from(&parent);
|
||||
let pio: Box<dyn IoProvider> = Box::new(FilesystemPrimaryInputIo::new(&p));
|
||||
(pio, Some(p), parent)
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ impl FormatCache {
|
|||
let mut p = self.formats_base.clone();
|
||||
p.push(format!(
|
||||
"{}-{}-{}.fmt",
|
||||
self.bundle_digest.to_string(),
|
||||
self.bundle_digest,
|
||||
stem,
|
||||
crate::FORMAT_SERIAL
|
||||
));
|
||||
|
|
|
@ -176,12 +176,8 @@ fn test_format_generation(texname: &str, fmtname: &str, sha256: &str) {
|
|||
let observed = info.write_digest.unwrap();
|
||||
|
||||
if observed != want_digest {
|
||||
println!(
|
||||
"expected {} to have SHA256 = {}",
|
||||
fmtname,
|
||||
want_digest.to_string()
|
||||
);
|
||||
println!("instead, got {}", observed.to_string());
|
||||
println!("expected {} to have SHA256 = {}", fmtname, want_digest);
|
||||
println!("instead, got {}", observed);
|
||||
panic!();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ impl<'a> ExpectedFile<'a> {
|
|||
.unwrap_or_else(|| panic!("couldn't Unicode-ify file name of {:?}", pbase))
|
||||
.replace(std::path::is_separator, "_");
|
||||
|
||||
let mut dec = GzDecoder::new(File::open(&pbase).unwrap());
|
||||
let mut dec = GzDecoder::new(File::open(pbase.as_path()).unwrap());
|
||||
let mut contents = Vec::new();
|
||||
dec.read_to_end(&mut contents).unwrap();
|
||||
|
||||
|
|
Loading…
Reference in New Issue