From 2daff544a55c3c4f95f50b6cb715fc4bcb73d5c1 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 17 Jul 2024 09:18:56 +0200 Subject: [PATCH 01/99] Add subcommand for experimental operations These may be temporary ones that help during analyzing and developing file formats, or or long term experiments. --- crates/dtmt/src/cmd/experiment/mod.rs | 17 +++++++++++++++++ crates/dtmt/src/main.rs | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 crates/dtmt/src/cmd/experiment/mod.rs diff --git a/crates/dtmt/src/cmd/experiment/mod.rs b/crates/dtmt/src/cmd/experiment/mod.rs new file mode 100644 index 0000000..b29f83a --- /dev/null +++ b/crates/dtmt/src/cmd/experiment/mod.rs @@ -0,0 +1,17 @@ +use clap::{ArgMatches, Command}; +use color_eyre::Result; + +pub(crate) fn command_definition() -> Command { + Command::new("experiment") + .subcommand_required(true) + .about("A collection of utilities and experiments.") +} + +#[tracing::instrument(skip_all)] +pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { + match matches.subcommand() { + _ => unreachable!( + "clap is configured to require a subcommand, and they're all handled above" + ), + } +} diff --git a/crates/dtmt/src/main.rs b/crates/dtmt/src/main.rs index 2e10b17..b01956a 100644 --- a/crates/dtmt/src/main.rs +++ b/crates/dtmt/src/main.rs @@ -21,6 +21,7 @@ mod cmd { pub mod build; pub mod bundle; pub mod dictionary; + pub mod experiment; pub mod migrate; pub mod murmur; pub mod new; @@ -56,6 +57,7 @@ async fn main() -> Result<()> { .subcommand(cmd::build::command_definition()) .subcommand(cmd::bundle::command_definition()) .subcommand(cmd::dictionary::command_definition()) + .subcommand(cmd::experiment::command_definition()) .subcommand(cmd::migrate::command_definition()) .subcommand(cmd::murmur::command_definition()) .subcommand(cmd::new::command_definition()) @@ -133,6 +135,7 @@ async fn main() -> Result<()> { Some(("build", sub_matches)) => cmd::build::run(ctx, sub_matches).await?, Some(("bundle", sub_matches)) => cmd::bundle::run(ctx, sub_matches).await?, Some(("dictionary", sub_matches)) => cmd::dictionary::run(ctx, sub_matches).await?, + Some(("experiment", sub_matches)) => cmd::experiment::run(ctx, sub_matches).await?, Some(("migrate", sub_matches)) => cmd::migrate::run(ctx, sub_matches).await?, Some(("murmur", sub_matches)) => cmd::murmur::run(ctx, sub_matches).await?, Some(("new", sub_matches)) => cmd::new::run(ctx, sub_matches).await?, From 94347d57f9790ff61188a64192e98b602d891afb Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sat, 16 Sep 2023 18:43:52 +0200 Subject: [PATCH 02/99] dtmt: Add command to extract words from file As part of trying to brute force values for the dictionary, this allows extracting candidate words from a file. --- .../dtmt/src/cmd/experiment/extract_words.rs | 182 ++++++++++++++++++ crates/dtmt/src/cmd/experiment/mod.rs | 4 + 2 files changed, 186 insertions(+) create mode 100644 crates/dtmt/src/cmd/experiment/extract_words.rs diff --git a/crates/dtmt/src/cmd/experiment/extract_words.rs b/crates/dtmt/src/cmd/experiment/extract_words.rs new file mode 100644 index 0000000..512038d --- /dev/null +++ b/crates/dtmt/src/cmd/experiment/extract_words.rs @@ -0,0 +1,182 @@ +use std::collections::HashSet; +use std::path::PathBuf; + +use clap::{value_parser, Arg, ArgMatches, Command, ValueEnum}; +use color_eyre::eyre::Context; +use color_eyre::Result; +use tokio::fs; + +pub(crate) fn command_definition() -> Command { + Command::new("extract-words") + .about( + "Extract unique alphanumeric sequences that match common identifier rules from the given file. \ + Only ASCII is supported.", + ) + .arg( + Arg::new("file") + .required(true) + .value_parser(value_parser!(PathBuf)) + .help("Path to the file to extract words from."), + ) + .arg( + Arg::new("min-length") + .help("Minimum length to consider a word.") + .long("min-length") + .short('m') + .default_value("3") + .value_parser(value_parser!(usize)) + ) + .arg( + Arg::new("algorithm") + .help("The algorithm to determine matching words") + .long("algorithm") + .short('a') + .default_value("identifier") + .value_parser(value_parser!(Algorithm)) + ) +} + +#[derive(Copy, Clone, Debug, ValueEnum)] +#[value(rename_all = "snake_case")] +enum Algorithm { + Alphabetic, + Alphanumeric, + Identifier, + Number, + Hash32, + Hash64, +} + +impl Algorithm { + fn is_start(&self, c: char) -> bool { + match self { + Self::Alphabetic => c.is_ascii_alphabetic(), + Self::Alphanumeric => c.is_ascii_alphanumeric(), + Self::Identifier => c.is_ascii_alphabetic(), + Self::Number => c.is_numeric(), + Self::Hash32 | Self::Hash64 => matches!(c, '0'..='9' | 'a'..='f' | 'A'..='F'), + } + } + + fn is_body(&self, c: char) -> bool { + match self { + Self::Alphabetic => c.is_ascii_alphabetic(), + Self::Alphanumeric => c.is_ascii_alphanumeric(), + Self::Identifier => c.is_ascii_alphanumeric(), + Self::Number => c.is_numeric(), + Self::Hash32 | Self::Hash64 => matches!(c, '0'..='9' | 'a'..='f' | 'A'..='F'), + } + } + + fn is_length(&self, len: usize) -> bool { + match self { + Self::Alphabetic => true, + Self::Alphanumeric => true, + Self::Identifier => true, + Self::Number => true, + Self::Hash32 => len == 8, + Self::Hash64 => len == 16, + } + } +} + +impl std::fmt::Display for Algorithm { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Algorithm::Alphabetic => "alphabetic", + Algorithm::Alphanumeric => "alphanumeric", + Algorithm::Identifier => "identifier", + Algorithm::Number => "number", + Algorithm::Hash32 => "hash32", + Algorithm::Hash64 => "hash64", + } + ) + } +} + +#[derive(Copy, Clone, Debug)] +enum State { + Begin, + NonWord, + Word, + End, +} + +#[tracing::instrument(skip_all)] +pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { + let path = matches + .get_one::("file") + .expect("missing required parameter"); + + let algorithm = matches + .get_one::("algorithm") + .expect("parameter has default"); + + let min_length = matches + .get_one::("min-length") + .copied() + .expect("paramter has default"); + + let content = fs::read_to_string(&path) + .await + .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; + let mut chars = content.chars(); + + let mut state = State::Begin; + let mut word = String::new(); + let mut visited = HashSet::new(); + + 'machine: loop { + state = match state { + State::Begin => match chars.next() { + None => State::End, + Some(c) if algorithm.is_start(c) => { + word.push(c); + State::Word + } + Some(_) => State::NonWord, + }, + State::End => break 'machine, + State::NonWord => match chars.next() { + None => State::End, + Some(c) if algorithm.is_body(c) => { + word.push(c); + State::Word + } + Some(_) => State::NonWord, + }, + State::Word => match chars.next() { + None => { + if word.len() >= min_length + && algorithm.is_length(word.len()) + && !visited.contains(&word) + { + println!("{}", &word); + visited.insert(word.clone()); + } + State::End + } + Some(c) if algorithm.is_body(c) => { + word.push(c); + State::Word + } + Some(_) => { + if word.len() >= min_length + && algorithm.is_length(word.len()) + && !visited.contains(&word) + { + println!("{}", &word); + visited.insert(word.clone()); + } + word.clear(); + State::NonWord + } + }, + } + } + + Ok(()) +} diff --git a/crates/dtmt/src/cmd/experiment/mod.rs b/crates/dtmt/src/cmd/experiment/mod.rs index b29f83a..51e5fc7 100644 --- a/crates/dtmt/src/cmd/experiment/mod.rs +++ b/crates/dtmt/src/cmd/experiment/mod.rs @@ -1,15 +1,19 @@ use clap::{ArgMatches, Command}; use color_eyre::Result; +mod extract_words; + pub(crate) fn command_definition() -> Command { Command::new("experiment") .subcommand_required(true) .about("A collection of utilities and experiments.") + .subcommand(extract_words::command_definition()) } #[tracing::instrument(skip_all)] pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { match matches.subcommand() { + Some(("extract-words", sub_matches)) => extract_words::run(ctx, sub_matches).await, _ => unreachable!( "clap is configured to require a subcommand, and they're all handled above" ), From 6485dae27bc152a6eef7533d548e2c8f871b6563 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sat, 16 Sep 2023 19:03:04 +0200 Subject: [PATCH 03/99] experiment: Add command to create word permutations This creates candidate values to brute force dictionary entries with, by building combinations from a word list and delimiters. --- Cargo.lock | 35 ++- crates/dtmt/Cargo.toml | 2 + .../src/cmd/experiment/brute_force_words.rs | 239 ++++++++++++++++++ crates/dtmt/src/cmd/experiment/mod.rs | 3 + 4 files changed, 277 insertions(+), 2 deletions(-) create mode 100644 crates/dtmt/src/cmd/experiment/brute_force_words.rs diff --git a/Cargo.lock b/Cargo.lock index a251de9..dac07e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -161,6 +161,17 @@ dependencies = [ "system-deps", ] +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.3.0" @@ -212,7 +223,7 @@ dependencies = [ "bitflags 2.5.0", "cexpr", "clang-sys", - "itertools", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -927,6 +938,7 @@ name = "dtmt" version = "0.3.0" dependencies = [ "async-recursion", + "atty", "clap", "cli-table", "color-eyre", @@ -936,6 +948,7 @@ dependencies = [ "futures", "futures-util", "glob", + "itertools 0.11.0", "luajit2-sys", "nanorand", "notify", @@ -1598,6 +1611,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1858,6 +1880,15 @@ version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.12.1" @@ -2267,7 +2298,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] diff --git a/crates/dtmt/Cargo.toml b/crates/dtmt/Cargo.toml index d836a50..8018a8b 100644 --- a/crates/dtmt/Cargo.toml +++ b/crates/dtmt/Cargo.toml @@ -33,6 +33,8 @@ async-recursion = "1.0.2" notify = "6.1.1" luajit2-sys = { path = "../../lib/luajit2-sys", version = "*" } shlex = { version = "1.2.0", optional = true } +atty = "0.2.14" +itertools = "0.11.0" [dev-dependencies] tempfile = "3.3.0" diff --git a/crates/dtmt/src/cmd/experiment/brute_force_words.rs b/crates/dtmt/src/cmd/experiment/brute_force_words.rs new file mode 100644 index 0000000..6bf81bb --- /dev/null +++ b/crates/dtmt/src/cmd/experiment/brute_force_words.rs @@ -0,0 +1,239 @@ +use std::path::PathBuf; + +use clap::{value_parser, Arg, ArgAction, ArgMatches, Command}; +use color_eyre::eyre::{self, Context}; +use color_eyre::Result; +use itertools::Itertools; +use tokio::fs; + +pub(crate) fn command_definition() -> Command { + Command::new("brute-force-words") + .about( + "Given a list of words and a set of delimiters, iteratevily creates permutations \ + of growing length.\n\ + Delimiters are placed between every word in the result.\n\n\ + Example: \ + Given the words ['packages', 'boot'], the delimiters ['/', '_'] and a length of 2, the resulting \ + words will be\n\ + - packages\n\ + - boot\n\ + - packages/packages\n\ + - packages_packages\n\ + - packages/boot\n\ + - packages_boot\n\ + - boot/packages\n\ + - boot_packages\n\ + - boot/boot\n\ + - boot_boot", + ) + .arg( + Arg::new("delimiter") + .help( + "The delimiters to put between the words. \ + All permutations of this list will be tried for every string of words.\n\ + Specify multiple times to set multiple values.\n\ + Defaults to ['/', '_'].", + ) + .short('d') + .long("delimiter") + .action(ArgAction::Append), + ) + .arg( + Arg::new("max-length") + .help("The maximum number of words up to which to build strings.") + .long("max") + .long("max-length") + .short('m') + .default_value("5") + .value_parser(value_parser!(usize)), + ) + .arg( + Arg::new("continue") + .help("Can be used to continue a previous operation where it stopped. Word list and delimiters must match.") + .short('c') + .long("continue") + ) + .arg( + Arg::new("words") + .help("Path to a file containing words line by line.") + .required(true) + .value_parser(value_parser!(PathBuf)), + ) +} + +#[tracing::instrument(skip_all)] +#[allow(clippy::mut_range_bound)] +pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { + let max_length: usize = matches + .get_one::("max-length") + .copied() + .expect("parameter has default"); + + let words: Vec = { + let path = matches + .get_one::("words") + .expect("missing required parameter"); + + let file = fs::read_to_string(&path) + .await + .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; + + file.lines().map(str::to_string).collect() + }; + + if words.is_empty() { + eyre::bail!("Word list must not be empty"); + } + + let mut delimiters: Vec = matches + .get_many::("delimiter") + .unwrap_or_default() + .cloned() + .collect(); + + if delimiters.is_empty() { + delimiters.push(String::from("/")); + delimiters.push(String::from("_")); + } + + let delimiters_len = delimiters.len(); + + let word_count = words.len(); + tracing::info!("{} words to try", word_count); + + // To be able to easily combine the permutations of words and delimiters, + // we turn the latter into a pre-defined list of all permutations of delimiters + // that are possible at the given amount of words. + // Combining `Iterator::cycle` with `Itertools::permutations` works, but + // with a high `max_length`, it runs OOM. + // So we basically have to implement a smaller version of the iterative algorithm we use later on + // to build permutations of the actual words. + let delimiter_lists = { + let mut indices = vec![0; max_length - 1]; + let mut list = Vec::new(); + + for _ in 0..delimiters_len.pow(max_length as u32 - 1) { + list.push(indices.iter().map(|i| &delimiters[*i]).collect::>()); + + for v in indices.iter_mut() { + if *v >= delimiters_len - 1 { + *v = 0; + break; + } else { + *v += 1; + } + } + } + + list + }; + + tracing::debug!("{:?}", delimiter_lists); + + let mut count = 0u64; + + let mut indices = if let Some(cont) = matches.get_one::("continue").cloned() { + let mut splits = vec![cont.clone()]; + + for delim in delimiters.iter() { + splits = splits + .iter() + .flat_map(|s| s.split(delim)) + .map(|s| s.to_string()) + .collect(); + } + + let indices = splits + .into_iter() + .map(|s| { + words + .iter() + .enumerate() + .find(|(_, v)| s == **v) + .map(|(i, _)| i) + .ok_or_else(|| eyre::eyre!("'{}' is not in the word list", s)) + }) + .collect::>()?; + + tracing::info!("Continuing from '{}' -> '{:?}'", cont, &indices); + + indices + } else { + vec![0] + }; + let mut indices_len = indices.len(); + let mut sequence = indices + .iter() + .map(|index| words[*index].as_str()) + .collect::>(); + + // Prevent re-allocation by reserving as much as we need upfront + indices.reserve(max_length); + sequence.reserve(max_length); + + 'outer: loop { + // We only want delimiters between words, so we keep that iterator shorter by + // one. + let delimiter_count = sequence.len() as u32 - 1; + + tracing::trace!( + "{} | {:?} -> {:?}", + delimiters_len.pow(delimiter_count), + indices, + sequence + ); + + for delims in delimiter_lists + .iter() + .take(delimiters_len.pow(delimiter_count)) + { + let delims = delims + .iter() + .map(|s| s.as_str()) + .take(delimiter_count as usize); + let s: String = sequence + .iter() + .copied() + .interleave(delims) + .flat_map(|word| word.chars()) + .collect(); + + count = count.wrapping_add(1); + + if count % 500000 == 0 { + tracing::info!("{} words generated", count); + } + + println!("{}", s); + } + + for i in 0..indices_len { + let index = indices.get_mut(i).unwrap(); + let word = sequence.get_mut(i).unwrap(); + + if *index >= word_count - 1 { + *index = 0; + *word = words[*index].as_str(); + + if indices.get(i + 1).is_none() { + indices.push(0); + sequence.push(words[0].as_str()); + + indices_len += 1; + + if indices_len > max_length { + break 'outer; + } + + break; + } + } else { + *index += 1; + *word = words[*index].as_str(); + break; + } + } + } + + Ok(()) +} diff --git a/crates/dtmt/src/cmd/experiment/mod.rs b/crates/dtmt/src/cmd/experiment/mod.rs index 51e5fc7..9ceb3b9 100644 --- a/crates/dtmt/src/cmd/experiment/mod.rs +++ b/crates/dtmt/src/cmd/experiment/mod.rs @@ -1,18 +1,21 @@ use clap::{ArgMatches, Command}; use color_eyre::Result; +mod brute_force_words; mod extract_words; pub(crate) fn command_definition() -> Command { Command::new("experiment") .subcommand_required(true) .about("A collection of utilities and experiments.") + .subcommand(brute_force_words::command_definition()) .subcommand(extract_words::command_definition()) } #[tracing::instrument(skip_all)] pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { match matches.subcommand() { + Some(("brute-force-words", sub_matches)) => brute_force_words::run(ctx, sub_matches).await, Some(("extract-words", sub_matches)) => extract_words::run(ctx, sub_matches).await, _ => unreachable!( "clap is configured to require a subcommand, and they're all handled above" From 0d1193a12688567fc30b963b3d79c20d96bf55c4 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 18 Sep 2023 10:26:58 +0200 Subject: [PATCH 04/99] sdk: Improve word generation throughput It seems that the simple `println!()` is really bad when the goal is to write a lot of data to stdout. Presumably because it's unbuffered, but also because it required the preceding code to do a lot of allocations. This was replaced with a buffered writer on stdout, as well as an extra `Vec` that I can write everything to directly from the word and delimiter iterators, without allocating a single new structure. --- .../src/cmd/experiment/brute_force_words.rs | 76 ++++++++++++++++--- 1 file changed, 67 insertions(+), 9 deletions(-) diff --git a/crates/dtmt/src/cmd/experiment/brute_force_words.rs b/crates/dtmt/src/cmd/experiment/brute_force_words.rs index 6bf81bb..d2891f9 100644 --- a/crates/dtmt/src/cmd/experiment/brute_force_words.rs +++ b/crates/dtmt/src/cmd/experiment/brute_force_words.rs @@ -5,6 +5,7 @@ use color_eyre::eyre::{self, Context}; use color_eyre::Result; use itertools::Itertools; use tokio::fs; +use tokio::io::{AsyncWriteExt, BufWriter}; pub(crate) fn command_definition() -> Command { Command::new("brute-force-words") @@ -98,6 +99,38 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> let delimiters_len = delimiters.len(); + let prefixes = [ + "", + "content/characters/", + "content/debug/", + "content/decals/", + "content/environment/", + "content/fx/", + "content/gizmos/", + "content/items/", + "content/levels/", + "content/liquid_area/", + "content/localization/", + "content/materials/", + "content/minion_impact_assets/", + "content/pickups/", + "content/shading_environments/", + "content/textures/", + "content/ui/", + "content/videos/", + "content/vo/", + "content/volume_types/", + "content/weapons/", + "packages/boot_assets/", + "packages/content/", + "packages/game_scripts/", + "packages/strings/", + "packages/ui/", + "wwise/events/", + "wwise/packages/", + "wwise/world_sound_fx/", + ]; + let word_count = words.len(); tracing::info!("{} words to try", word_count); @@ -171,6 +204,13 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> indices.reserve(max_length); sequence.reserve(max_length); + let mut writer = BufWriter::new(tokio::io::stdout()); + let mut buf = Vec::with_capacity(1024); + + const LINE_FEED: u8 = 0x0A; + const UNDERSCORE: u8 = 0x5F; + const ZERO: u8 = 0x30; + 'outer: loop { // We only want delimiters between words, so we keep that iterator shorter by // one. @@ -191,20 +231,38 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> .iter() .map(|s| s.as_str()) .take(delimiter_count as usize); - let s: String = sequence - .iter() - .copied() - .interleave(delims) - .flat_map(|word| word.chars()) - .collect(); + let s = sequence.iter().copied().interleave(delims.clone()); count = count.wrapping_add(1); - if count % 500000 == 0 { - tracing::info!("{} words generated", count); + buf.clear(); + + for prefix in prefixes.iter() { + buf.extend_from_slice(prefix.as_bytes()); + s.clone() + .for_each(|word| buf.extend_from_slice(word.as_bytes())); + // buf.extend_from_slice(s.as_bytes()); + buf.push(LINE_FEED); + + for i in 0..=9 { + buf.extend_from_slice(prefix.as_bytes()); + s.clone() + .for_each(|word| buf.extend_from_slice(word.as_bytes())); + buf.push(UNDERSCORE); + buf.push(ZERO + i); + buf.push(LINE_FEED); + + buf.extend_from_slice(prefix.as_bytes()); + s.clone() + .for_each(|word| buf.extend_from_slice(word.as_bytes())); + buf.push(UNDERSCORE); + buf.push(ZERO); + buf.push(ZERO + i); + buf.push(LINE_FEED); + } } - println!("{}", s); + writer.write_all(&buf).await?; } for i in 0..indices_len { From 4480144d92db48f1f1515ef046984f941f14a89f Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 18 Sep 2023 13:29:42 +0200 Subject: [PATCH 05/99] sdk: Implement guessing a list of hashes While the approach to generate and store a list of strings does allow for this list to be re-used in the future, the I/O involved turned out to be quite costly. While the generation can run at up to 500 MiB/s, even compressing that on the fly doesn't reach fast enough write speeds on a HDD. And compression is also necessary to store this amount of data (generation reached two TB of raw data with a word length of just three, which is still 600 GB compressed). But compression also makes working with that data a lot harder. So this instead combines both the generation and search into a single step. The intermediate result of the generation is therefore lost, but the overall pipeline is much faster. --- .../src/cmd/experiment/brute_force_words.rs | 120 +++++++++++++++--- 1 file changed, 102 insertions(+), 18 deletions(-) diff --git a/crates/dtmt/src/cmd/experiment/brute_force_words.rs b/crates/dtmt/src/cmd/experiment/brute_force_words.rs index d2891f9..bb3aa9e 100644 --- a/crates/dtmt/src/cmd/experiment/brute_force_words.rs +++ b/crates/dtmt/src/cmd/experiment/brute_force_words.rs @@ -1,11 +1,14 @@ +use std::collections::HashSet; use std::path::PathBuf; use clap::{value_parser, Arg, ArgAction, ArgMatches, Command}; use color_eyre::eyre::{self, Context}; use color_eyre::Result; use itertools::Itertools; +use sdk::murmur::Murmur64; use tokio::fs; -use tokio::io::{AsyncWriteExt, BufWriter}; +use tokio::io::AsyncWriteExt; +use tokio::time::Instant; pub(crate) fn command_definition() -> Command { Command::new("brute-force-words") @@ -60,6 +63,15 @@ pub(crate) fn command_definition() -> Command { .required(true) .value_parser(value_parser!(PathBuf)), ) + .arg( + Arg::new("hashes") + .help( + "Path to a file containing the hashes to attempt to brute force. \ + Hashes are expected in hexadecimal notiation. \ + Only 64-bit hashes are supported." + ) + .value_parser(value_parser!(PathBuf)), + ) } #[tracing::instrument(skip_all)] @@ -86,6 +98,25 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> eyre::bail!("Word list must not be empty"); } + let hashes = if let Some(path) = matches.get_one::("hashes") { + let content = fs::read_to_string(&path) + .await + .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; + + let hashes: Result, _> = content + .lines() + .map(|s| u64::from_str_radix(s, 16).map(Murmur64::from)) + .collect(); + + let hashes = hashes?; + + tracing::trace!("{:?}", hashes); + + Some(hashes) + } else { + None + }; + let mut delimiters: Vec = matches .get_many::("delimiter") .unwrap_or_default() @@ -163,8 +194,6 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> tracing::debug!("{:?}", delimiter_lists); - let mut count = 0u64; - let mut indices = if let Some(cont) = matches.get_one::("continue").cloned() { let mut splits = vec![cont.clone()]; @@ -204,7 +233,12 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> indices.reserve(max_length); sequence.reserve(max_length); - let mut writer = BufWriter::new(tokio::io::stdout()); + let mut count: usize = 0; + let mut found: usize = 0; + let mut start = Instant::now(); + + // let mut writer = BufWriter::new(tokio::io::stdout()); + let mut writer = tokio::io::stdout(); let mut buf = Vec::with_capacity(1024); const LINE_FEED: u8 = 0x0A; @@ -216,13 +250,6 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> // one. let delimiter_count = sequence.len() as u32 - 1; - tracing::trace!( - "{} | {:?} -> {:?}", - delimiters_len.pow(delimiter_count), - indices, - sequence - ); - for delims in delimiter_lists .iter() .take(delimiters_len.pow(delimiter_count)) @@ -233,16 +260,25 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> .take(delimiter_count as usize); let s = sequence.iter().copied().interleave(delims.clone()); - count = count.wrapping_add(1); - buf.clear(); for prefix in prefixes.iter() { buf.extend_from_slice(prefix.as_bytes()); s.clone() .for_each(|word| buf.extend_from_slice(word.as_bytes())); - // buf.extend_from_slice(s.as_bytes()); - buf.push(LINE_FEED); + + if let Some(hashes) = &hashes { + let hash = Murmur64::hash(&buf); + if hashes.contains(&hash) { + found += 1; + buf.push(LINE_FEED); + writer.write_all(&buf).await?; + } + + buf.clear(); + } else { + buf.push(LINE_FEED); + } for i in 0..=9 { buf.extend_from_slice(prefix.as_bytes()); @@ -250,7 +286,19 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> .for_each(|word| buf.extend_from_slice(word.as_bytes())); buf.push(UNDERSCORE); buf.push(ZERO + i); - buf.push(LINE_FEED); + + if let Some(hashes) = &hashes { + let hash = Murmur64::hash(&buf); + if hashes.contains(&hash) { + found += 1; + buf.push(LINE_FEED); + writer.write_all(&buf).await?; + } + + buf.clear(); + } else { + buf.push(LINE_FEED); + } buf.extend_from_slice(prefix.as_bytes()); s.clone() @@ -258,11 +306,47 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> buf.push(UNDERSCORE); buf.push(ZERO); buf.push(ZERO + i); - buf.push(LINE_FEED); + + if let Some(hashes) = &hashes { + let hash = Murmur64::hash(&buf); + if hashes.contains(&hash) { + found += 1; + buf.push(LINE_FEED); + writer.write_all(&buf).await?; + } + + buf.clear(); + } else { + buf.push(LINE_FEED); + } } } - writer.write_all(&buf).await?; + if let Some(hashes) = &hashes { + count += prefixes.len() * 20; + + let dur = Instant::now() - start; + if dur.as_secs() >= 1 { + let hashes_len = hashes.len(); + // Don't care when it finishes, don't care if it fails. + tokio::spawn(async move { + let _ = tokio::io::stderr() + .write_all( + format!( + "\r{} hashes per second, {}/{} found", + count, found, hashes_len + ) + .as_bytes(), + ) + .await; + }); + + start = Instant::now(); + count = 0; + } + } else { + writer.write_all(&buf).await?; + } } for i in 0..indices_len { From 951a7f82c0a2f1532df9a14ff622504a03bc20a7 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 19 Sep 2023 15:28:40 +0200 Subject: [PATCH 06/99] sdk: Improve word generation --- .../src/cmd/experiment/brute_force_words.rs | 164 +++++++++--------- 1 file changed, 79 insertions(+), 85 deletions(-) diff --git a/crates/dtmt/src/cmd/experiment/brute_force_words.rs b/crates/dtmt/src/cmd/experiment/brute_force_words.rs index bb3aa9e..7e93dcc 100644 --- a/crates/dtmt/src/cmd/experiment/brute_force_words.rs +++ b/crates/dtmt/src/cmd/experiment/brute_force_words.rs @@ -70,6 +70,7 @@ pub(crate) fn command_definition() -> Command { Hashes are expected in hexadecimal notiation. \ Only 64-bit hashes are supported." ) + .required(true) .value_parser(value_parser!(PathBuf)), ) } @@ -98,7 +99,10 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> eyre::bail!("Word list must not be empty"); } - let hashes = if let Some(path) = matches.get_one::("hashes") { + let hashes = { + let path = matches + .get_one::("hashes") + .expect("missing required argument"); let content = fs::read_to_string(&path) .await .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; @@ -112,9 +116,7 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> tracing::trace!("{:?}", hashes); - Some(hashes) - } else { - None + hashes }; let mut delimiters: Vec = matches @@ -250,103 +252,95 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> // one. let delimiter_count = sequence.len() as u32 - 1; - for delims in delimiter_lists - .iter() - .take(delimiters_len.pow(delimiter_count)) - { - let delims = delims - .iter() - .map(|s| s.as_str()) - .take(delimiter_count as usize); - let s = sequence.iter().copied().interleave(delims.clone()); - + for prefix in prefixes.iter().map(|p| p.as_bytes()) { buf.clear(); - for prefix in prefixes.iter() { - buf.extend_from_slice(prefix.as_bytes()); - s.clone() + // We can keep the prefix at the front of the buffer and only + // replace the parts after that. + let prefix_len = prefix.len(); + buf.extend_from_slice(prefix); + + for delims in delimiter_lists + .iter() + .take(delimiters_len.pow(delimiter_count)) + { + buf.truncate(prefix_len); + + let delims = delims + .iter() + .map(|s| s.as_str()) + .take(delimiter_count as usize); + sequence + .iter() + .copied() + .interleave(delims.clone()) .for_each(|word| buf.extend_from_slice(word.as_bytes())); - if let Some(hashes) = &hashes { - let hash = Murmur64::hash(&buf); - if hashes.contains(&hash) { - found += 1; - buf.push(LINE_FEED); - writer.write_all(&buf).await?; - } + count += 1; - buf.clear(); - } else { + let hash = Murmur64::hash(&buf); + if hashes.contains(&hash) { + found += 1; buf.push(LINE_FEED); - } + writer.write_all(&buf).await?; + } else { + let word_len = buf.len(); - for i in 0..=9 { - buf.extend_from_slice(prefix.as_bytes()); - s.clone() - .for_each(|word| buf.extend_from_slice(word.as_bytes())); - buf.push(UNDERSCORE); - buf.push(ZERO + i); + // If the regular word itself didn't match, we check + // for numbered suffixes. + // For now, we only check up to `09` to avoid more complex logic + // writing into the buffer. + // Packages that contain files with higher numbers than this + // should hopefully become easier to spot once a good number of + // hashes is found. + for i in 1..=9 { + buf.truncate(word_len); + buf.push(UNDERSCORE); + buf.push(ZERO); + buf.push(ZERO + i); + + count += 1; - if let Some(hashes) = &hashes { let hash = Murmur64::hash(&buf); if hashes.contains(&hash) { found += 1; buf.push(LINE_FEED); writer.write_all(&buf).await?; + } else { + break; } - - buf.clear(); - } else { - buf.push(LINE_FEED); - } - - buf.extend_from_slice(prefix.as_bytes()); - s.clone() - .for_each(|word| buf.extend_from_slice(word.as_bytes())); - buf.push(UNDERSCORE); - buf.push(ZERO); - buf.push(ZERO + i); - - if let Some(hashes) = &hashes { - let hash = Murmur64::hash(&buf); - if hashes.contains(&hash) { - found += 1; - buf.push(LINE_FEED); - writer.write_all(&buf).await?; - } - - buf.clear(); - } else { - buf.push(LINE_FEED); } } } + } - if let Some(hashes) = &hashes { - count += prefixes.len() * 20; + let dur = Instant::now() - start; + if dur.as_secs() >= 1 { + let hashes_len = hashes.len(); + let s = String::from_utf8_lossy(&buf); + // The last prefix in the set is the one that will stay in the buffer + // when we're about to print here. + // So we strip that, to show just the generated part. + // We also restrict the length to stay on a single line. + let prefix_len = prefixes[28].len(); + let s = s[prefix_len..std::cmp::min(s.len(), prefix_len + 60)] + .trim_end() + .to_string(); + // Don't care when it finishes, don't care if it fails. + tokio::spawn(async move { + let _ = tokio::io::stderr() + .write_all( + format!( + "\r{:8} hashes per second | {:6}/{} found | {:<60}", + count, found, hashes_len, s + ) + .as_bytes(), + ) + .await; + }); - let dur = Instant::now() - start; - if dur.as_secs() >= 1 { - let hashes_len = hashes.len(); - // Don't care when it finishes, don't care if it fails. - tokio::spawn(async move { - let _ = tokio::io::stderr() - .write_all( - format!( - "\r{} hashes per second, {}/{} found", - count, found, hashes_len - ) - .as_bytes(), - ) - .await; - }); - - start = Instant::now(); - count = 0; - } - } else { - writer.write_all(&buf).await?; - } + start = Instant::now(); + count = 0; } for i in 0..indices_len { @@ -358,15 +352,15 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> *word = words[*index].as_str(); if indices.get(i + 1).is_none() { - indices.push(0); - sequence.push(words[0].as_str()); - indices_len += 1; if indices_len > max_length { break 'outer; } + indices.push(0); + sequence.push(words[0].as_str()); + break; } } else { From b366185a63f8182b1c9d8e32b16f738a42f7a912 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 19 Sep 2023 15:29:40 +0200 Subject: [PATCH 07/99] sdk: Implement worker pool for word generation Massive speed improvement. The index generation is really fast, and it appears that even worker numbers way higher than the core/thread count still increase the throughput slightly. The only missing part is the info output. That's broken, currently. --- Cargo.lock | 49 ++ crates/dtmt/Cargo.toml | 1 + .../src/cmd/experiment/brute_force_words.rs | 544 +++++++++++------- crates/dtmt/src/cmd/experiment/mod.rs | 4 +- 4 files changed, 401 insertions(+), 197 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dac07e9..3a02b55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -658,6 +658,20 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + [[package]] name = "crossbeam-channel" version = "0.5.12" @@ -667,6 +681,40 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.1", + "scopeguard", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -943,6 +991,7 @@ dependencies = [ "cli-table", "color-eyre", "confy", + "crossbeam", "csv-async", "dtmt-shared", "futures", diff --git a/crates/dtmt/Cargo.toml b/crates/dtmt/Cargo.toml index 8018a8b..e80feaa 100644 --- a/crates/dtmt/Cargo.toml +++ b/crates/dtmt/Cargo.toml @@ -35,6 +35,7 @@ luajit2-sys = { path = "../../lib/luajit2-sys", version = "*" } shlex = { version = "1.2.0", optional = true } atty = "0.2.14" itertools = "0.11.0" +crossbeam = { version = "0.8.2", features = ["crossbeam-deque"] } [dev-dependencies] tempfile = "3.3.0" diff --git a/crates/dtmt/src/cmd/experiment/brute_force_words.rs b/crates/dtmt/src/cmd/experiment/brute_force_words.rs index 7e93dcc..aa15003 100644 --- a/crates/dtmt/src/cmd/experiment/brute_force_words.rs +++ b/crates/dtmt/src/cmd/experiment/brute_force_words.rs @@ -1,13 +1,16 @@ use std::collections::HashSet; +use std::fs; +use std::io::Write; use std::path::PathBuf; +use std::sync::Arc; +use std::thread::JoinHandle; use clap::{value_parser, Arg, ArgAction, ArgMatches, Command}; use color_eyre::eyre::{self, Context}; use color_eyre::Result; +use crossbeam::channel::{bounded, unbounded, Receiver, Sender}; use itertools::Itertools; use sdk::murmur::Murmur64; -use tokio::fs; -use tokio::io::AsyncWriteExt; use tokio::time::Instant; pub(crate) fn command_definition() -> Command { @@ -57,6 +60,14 @@ pub(crate) fn command_definition() -> Command { .short('c') .long("continue") ) + .arg( + Arg::new("threads") + .help("The number of workers to run in parallel.") + .long("threads") + .short('n') + .default_value("6") + .value_parser(value_parser!(usize)) + ) .arg( Arg::new("words") .help("Path to a file containing words line by line.") @@ -75,36 +86,307 @@ pub(crate) fn command_definition() -> Command { ) } +const LINE_FEED: u8 = 0x0A; +const UNDERSCORE: u8 = 0x5F; +const ZERO: u8 = 0x30; + +const PREFIXES: [&str; 29] = [ + "", + "content/characters/", + "content/debug/", + "content/decals/", + "content/environment/", + "content/fx/", + "content/gizmos/", + "content/items/", + "content/levels/", + "content/liquid_area/", + "content/localization/", + "content/materials/", + "content/minion_impact_assets/", + "content/pickups/", + "content/shading_environments/", + "content/textures/", + "content/ui/", + "content/videos/", + "content/vo/", + "content/volume_types/", + "content/weapons/", + "packages/boot_assets/", + "packages/content/", + "packages/game_scripts/", + "packages/strings/", + "packages/ui/", + "wwise/events/", + "wwise/packages/", + "wwise/world_sound_fx/", +]; + +fn make_info_printer(rx: Receiver<(usize, usize)>, hash_count: usize) -> JoinHandle<()> { + std::thread::spawn(move || { + let mut writer = std::io::stderr(); + let mut total_count = 0; + let mut total_found = 0; + + let start = Instant::now(); + + while let Ok((count, found)) = rx.recv() { + total_count += count; + total_found += found; + + let dur = Instant::now() - start; + if dur.as_secs() > 1 { + let s = format!("\r{total_count} per second | {total_found:6}/{hash_count} found",); + + // let s = String::from_utf8_lossy(&buf); + // // The last prefix in the set is the one that will stay in the buffer + // // when we're about to print here. + // // So we strip that, to show just the generated part. + // // We also restrict the length to stay on a single line. + // let prefix_len = prefixes[28].len(); + // let s = s[prefix_len..std::cmp::min(s.len(), prefix_len + 60)] + // .trim_end() + // .to_string(); + + writer.write_all(s.as_bytes()).unwrap(); + + total_count = 0; + } + } + }) +} + +fn make_stdout_printer(rx: Receiver>) -> JoinHandle<()> { + std::thread::spawn(move || { + let mut writer = std::io::stdout(); + + while let Ok(buf) = rx.recv() { + writer.write_all(&buf).unwrap(); + } + }) +} + +struct State { + delimiter_lists: Arc>>, + hashes: Arc>, + words: Arc>, + delimiters_len: usize, + stdout_tx: Sender>, + info_tx: Sender<(usize, usize)>, +} + +fn make_worker(rx: Receiver>, state: State) -> JoinHandle<()> { + std::thread::spawn(move || { + let delimiter_lists = &state.delimiter_lists; + let hashes = &state.hashes; + let words = &state.words; + let delimiters_len = state.delimiters_len; + + let mut count = 0; + let mut found = 0; + let mut buf = Vec::with_capacity(1024); + + // while let Some(indices) = find_task(local, global, &[]) { + while let Ok(indices) = rx.recv() { + let sequence = indices.iter().map(|i| words[*i].as_str()); + + // We only want delimiters between words, so we keep that iterator shorter by + // one. + let delimiter_count = sequence.len() as u32 - 1; + + for prefix in PREFIXES.iter().map(|p| p.as_bytes()) { + buf.clear(); + + // We can keep the prefix at the front of the buffer and only + // replace the parts after that. + let prefix_len = prefix.len(); + buf.extend_from_slice(prefix); + + for delims in delimiter_lists + .iter() + .take(delimiters_len.pow(delimiter_count)) + { + buf.truncate(prefix_len); + + let delims = delims + .iter() + .map(|s| s.as_str()) + .take(delimiter_count as usize); + sequence + .clone() + .interleave(delims.clone()) + .for_each(|word| buf.extend_from_slice(word.as_bytes())); + + count += 1; + + let hash = Murmur64::hash(&buf); + if hashes.contains(&hash) { + found += 1; + + buf.push(LINE_FEED); + if let Err(_) = state.stdout_tx.send(buf.clone()) { + return; + } + } else { + let word_len = buf.len(); + + // If the regular word itself didn't match, we check + // for numbered suffixes. + // For now, we only check up to `09` to avoid more complex logic + // writing into the buffer. + // Packages that contain files with higher numbers than this + // should hopefully become easier to spot once a good number of + // hashes is found. + for i in 1..=9 { + buf.truncate(word_len); + buf.push(UNDERSCORE); + buf.push(ZERO); + buf.push(ZERO + i); + + count += 1; + + let hash = Murmur64::hash(&buf); + if hashes.contains(&hash) { + found += 1; + + buf.push(LINE_FEED); + if let Err(_) = state.stdout_tx.send(buf.clone()) { + return; + } + } else { + break; + } + } + } + } + } + + if count >= 1024 * 1024 { + let _ = state.info_tx.send((count, found)); + } + + // let dur = Instant::now() - start; + // if dur.as_secs() >= 1 { + // let hashes_len = hashes.len(); + // let s = String::from_utf8_lossy(&buf); + // // The last prefix in the set is the one that will stay in the buffer + // // when we're about to print here. + // // So we strip that, to show just the generated part. + // // We also restrict the length to stay on a single line. + // let prefix_len = prefixes[28].len(); + // let s = s[prefix_len..std::cmp::min(s.len(), prefix_len + 60)] + // .trim_end() + // .to_string(); + // info_tx.send(format!( + // "\r{:8} hashes per second | {:6}/{} found | {:<60}", + // count, found, hashes_len, s + // )); + + // start = Instant::now(); + // count = 0; + // } + } + }) +} + +fn build_delimiter_lists(delimiters: impl AsRef<[String]>, max_length: usize) -> Vec> { + let delimiters = delimiters.as_ref(); + let mut indices = vec![0; max_length]; + let mut list = Vec::new(); + + for _ in 0..delimiters.len().pow(max_length as u32) { + list.push( + indices + .iter() + .map(|i| delimiters[*i].clone()) + .collect::>(), + ); + + for v in indices.iter_mut() { + if *v >= delimiters.len() - 1 { + *v = 0; + break; + } else { + *v += 1; + } + } + } + + list +} + +fn build_initial_indices( + cont: Option<&String>, + delimiters: impl AsRef<[String]>, + words: impl AsRef<[String]>, +) -> Result> { + if let Some(cont) = cont { + let mut splits = vec![cont.clone()]; + + for delim in delimiters.as_ref().iter() { + splits = splits + .iter() + .flat_map(|s| s.split(delim)) + .map(|s| s.to_string()) + .collect(); + } + + let indices = splits + .into_iter() + .map(|s| { + words + .as_ref() + .iter() + .enumerate() + .find(|(_, v)| s == **v) + .map(|(i, _)| i) + .ok_or_else(|| eyre::eyre!("'{}' is not in the word list", s)) + }) + .collect::>()?; + + tracing::info!("Continuing from '{}' -> '{:?}'", cont, &indices); + + Ok(indices) + } else { + Ok(vec![0]) + } +} + #[tracing::instrument(skip_all)] #[allow(clippy::mut_range_bound)] -pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { +pub(crate) fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { let max_length: usize = matches .get_one::("max-length") .copied() .expect("parameter has default"); - let words: Vec = { + let num_threads: usize = matches + .get_one::("threads") + .copied() + .expect("parameter has default"); + + let words = { let path = matches .get_one::("words") .expect("missing required parameter"); - let file = fs::read_to_string(&path) - .await + let file = fs::read_to_string(path) .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; - file.lines().map(str::to_string).collect() - }; + let words: Vec<_> = file.lines().map(str::to_string).collect(); - if words.is_empty() { - eyre::bail!("Word list must not be empty"); - } + if words.is_empty() { + eyre::bail!("Word list must not be empty"); + } + + Arc::new(words) + }; let hashes = { let path = matches .get_one::("hashes") .expect("missing required argument"); - let content = fs::read_to_string(&path) - .await + let content = fs::read_to_string(path) .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; let hashes: Result, _> = content @@ -116,7 +398,7 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> tracing::trace!("{:?}", hashes); - hashes + Arc::new(hashes) }; let mut delimiters: Vec = matches @@ -132,38 +414,6 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> let delimiters_len = delimiters.len(); - let prefixes = [ - "", - "content/characters/", - "content/debug/", - "content/decals/", - "content/environment/", - "content/fx/", - "content/gizmos/", - "content/items/", - "content/levels/", - "content/liquid_area/", - "content/localization/", - "content/materials/", - "content/minion_impact_assets/", - "content/pickups/", - "content/shading_environments/", - "content/textures/", - "content/ui/", - "content/videos/", - "content/vo/", - "content/volume_types/", - "content/weapons/", - "packages/boot_assets/", - "packages/content/", - "packages/game_scripts/", - "packages/strings/", - "packages/ui/", - "wwise/events/", - "wwise/packages/", - "wwise/world_sound_fx/", - ]; - let word_count = words.len(); tracing::info!("{} words to try", word_count); @@ -175,56 +425,43 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> // So we basically have to implement a smaller version of the iterative algorithm we use later on // to build permutations of the actual words. let delimiter_lists = { - let mut indices = vec![0; max_length - 1]; - let mut list = Vec::new(); - - for _ in 0..delimiters_len.pow(max_length as u32 - 1) { - list.push(indices.iter().map(|i| &delimiters[*i]).collect::>()); - - for v in indices.iter_mut() { - if *v >= delimiters_len - 1 { - *v = 0; - break; - } else { - *v += 1; - } - } - } - - list + let lists = build_delimiter_lists(&delimiters, max_length - 1); + Arc::new(lists) }; - tracing::debug!("{:?}", delimiter_lists); - let mut indices = if let Some(cont) = matches.get_one::("continue").cloned() { - let mut splits = vec![cont.clone()]; + let (info_tx, info_rx) = unbounded(); + let (stdout_tx, stdout_rx) = unbounded::>(); + let (task_tx, task_rx) = bounded::>(100); + let mut handles = Vec::new(); - for delim in delimiters.iter() { - splits = splits - .iter() - .flat_map(|s| s.split(delim)) - .map(|s| s.to_string()) - .collect(); - } + for _ in 0..num_threads { + let handle = make_worker( + task_rx.clone(), + State { + delimiter_lists: Arc::clone(&delimiter_lists), + hashes: Arc::clone(&hashes), + words: Arc::clone(&words), + delimiters_len, + stdout_tx: stdout_tx.clone(), + info_tx: info_tx.clone(), + }, + ); + handles.push(handle); + } + // These are only used inside the worker threads, but due to the loops above, we had to + // clone them one too many times. + // So we drop that extra reference immediately, to ensure that the channels can + // disconnect properly when the threads finish. + drop(stdout_tx); + drop(info_tx); - let indices = splits - .into_iter() - .map(|s| { - words - .iter() - .enumerate() - .find(|(_, v)| s == **v) - .map(|(i, _)| i) - .ok_or_else(|| eyre::eyre!("'{}' is not in the word list", s)) - }) - .collect::>()?; + // handles.push(make_info_printer(info_rx, hashes.len())); + handles.push(make_stdout_printer(stdout_rx)); - tracing::info!("Continuing from '{}' -> '{:?}'", cont, &indices); - - indices - } else { - vec![0] - }; + let mut indices = + build_initial_indices(matches.get_one::("continue"), &delimiters, &*words) + .wrap_err("Failed to build initial indices")?; let mut indices_len = indices.len(); let mut sequence = indices .iter() @@ -235,113 +472,8 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> indices.reserve(max_length); sequence.reserve(max_length); - let mut count: usize = 0; - let mut found: usize = 0; - let mut start = Instant::now(); - - // let mut writer = BufWriter::new(tokio::io::stdout()); - let mut writer = tokio::io::stdout(); - let mut buf = Vec::with_capacity(1024); - - const LINE_FEED: u8 = 0x0A; - const UNDERSCORE: u8 = 0x5F; - const ZERO: u8 = 0x30; - 'outer: loop { - // We only want delimiters between words, so we keep that iterator shorter by - // one. - let delimiter_count = sequence.len() as u32 - 1; - - for prefix in prefixes.iter().map(|p| p.as_bytes()) { - buf.clear(); - - // We can keep the prefix at the front of the buffer and only - // replace the parts after that. - let prefix_len = prefix.len(); - buf.extend_from_slice(prefix); - - for delims in delimiter_lists - .iter() - .take(delimiters_len.pow(delimiter_count)) - { - buf.truncate(prefix_len); - - let delims = delims - .iter() - .map(|s| s.as_str()) - .take(delimiter_count as usize); - sequence - .iter() - .copied() - .interleave(delims.clone()) - .for_each(|word| buf.extend_from_slice(word.as_bytes())); - - count += 1; - - let hash = Murmur64::hash(&buf); - if hashes.contains(&hash) { - found += 1; - buf.push(LINE_FEED); - writer.write_all(&buf).await?; - } else { - let word_len = buf.len(); - - // If the regular word itself didn't match, we check - // for numbered suffixes. - // For now, we only check up to `09` to avoid more complex logic - // writing into the buffer. - // Packages that contain files with higher numbers than this - // should hopefully become easier to spot once a good number of - // hashes is found. - for i in 1..=9 { - buf.truncate(word_len); - buf.push(UNDERSCORE); - buf.push(ZERO); - buf.push(ZERO + i); - - count += 1; - - let hash = Murmur64::hash(&buf); - if hashes.contains(&hash) { - found += 1; - buf.push(LINE_FEED); - writer.write_all(&buf).await?; - } else { - break; - } - } - } - } - } - - let dur = Instant::now() - start; - if dur.as_secs() >= 1 { - let hashes_len = hashes.len(); - let s = String::from_utf8_lossy(&buf); - // The last prefix in the set is the one that will stay in the buffer - // when we're about to print here. - // So we strip that, to show just the generated part. - // We also restrict the length to stay on a single line. - let prefix_len = prefixes[28].len(); - let s = s[prefix_len..std::cmp::min(s.len(), prefix_len + 60)] - .trim_end() - .to_string(); - // Don't care when it finishes, don't care if it fails. - tokio::spawn(async move { - let _ = tokio::io::stderr() - .write_all( - format!( - "\r{:8} hashes per second | {:6}/{} found | {:<60}", - count, found, hashes_len, s - ) - .as_bytes(), - ) - .await; - }); - - start = Instant::now(); - count = 0; - } + task_tx.send(indices.clone())?; for i in 0..indices_len { let index = indices.get_mut(i).unwrap(); @@ -371,5 +503,25 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> } } + // Dropping the senders will disconnect the channel, + // so that the threads holding the other end will eventually + // complete as well. + drop(task_tx); + + tracing::debug!("Wainting for workers to finish."); + + for handle in handles { + match handle.join() { + Ok(_) => {} + Err(value) => { + if let Some(err) = value.downcast_ref::() { + eyre::bail!("Thread failed: {}", err); + } else { + eyre::bail!("Thread failed with unknown error: {:?}", value); + } + } + } + } + Ok(()) } diff --git a/crates/dtmt/src/cmd/experiment/mod.rs b/crates/dtmt/src/cmd/experiment/mod.rs index 9ceb3b9..c53d9b5 100644 --- a/crates/dtmt/src/cmd/experiment/mod.rs +++ b/crates/dtmt/src/cmd/experiment/mod.rs @@ -15,7 +15,9 @@ pub(crate) fn command_definition() -> Command { #[tracing::instrument(skip_all)] pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { match matches.subcommand() { - Some(("brute-force-words", sub_matches)) => brute_force_words::run(ctx, sub_matches).await, + // It's fine to block here, as this is the only thing that's executing on the runtime. + // The other option with `spawn_blocking` would require setting up values to be Send+Sync. + Some(("brute-force-words", sub_matches)) => brute_force_words::run(ctx, sub_matches), Some(("extract-words", sub_matches)) => extract_words::run(ctx, sub_matches).await, _ => unreachable!( "clap is configured to require a subcommand, and they're all handled above" From 64493547143f43b90e405a9ef98fe31066de93a9 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 19 Sep 2023 16:15:22 +0200 Subject: [PATCH 08/99] sdk: Reimplement logging current word --- .../src/cmd/experiment/brute_force_words.rs | 86 ++++++++----------- 1 file changed, 36 insertions(+), 50 deletions(-) diff --git a/crates/dtmt/src/cmd/experiment/brute_force_words.rs b/crates/dtmt/src/cmd/experiment/brute_force_words.rs index aa15003..4bf8556 100644 --- a/crates/dtmt/src/cmd/experiment/brute_force_words.rs +++ b/crates/dtmt/src/cmd/experiment/brute_force_words.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; use std::fs; -use std::io::Write; +use std::io::{BufWriter, Write}; use std::path::PathBuf; use std::sync::Arc; use std::thread::JoinHandle; @@ -122,35 +122,30 @@ const PREFIXES: [&str; 29] = [ "wwise/world_sound_fx/", ]; -fn make_info_printer(rx: Receiver<(usize, usize)>, hash_count: usize) -> JoinHandle<()> { +fn make_info_printer(rx: Receiver<(usize, usize, String)>, hash_count: usize) -> JoinHandle<()> { std::thread::spawn(move || { let mut writer = std::io::stderr(); let mut total_count = 0; let mut total_found = 0; - let start = Instant::now(); + let mut start = Instant::now(); - while let Ok((count, found)) = rx.recv() { + while let Ok((count, found, last)) = rx.recv() { total_count += count; total_found += found; - let dur = Instant::now() - start; - if dur.as_secs() > 1 { - let s = format!("\r{total_count} per second | {total_found:6}/{hash_count} found",); - - // let s = String::from_utf8_lossy(&buf); - // // The last prefix in the set is the one that will stay in the buffer - // // when we're about to print here. - // // So we strip that, to show just the generated part. - // // We also restrict the length to stay on a single line. - // let prefix_len = prefixes[28].len(); - // let s = s[prefix_len..std::cmp::min(s.len(), prefix_len + 60)] - // .trim_end() - // .to_string(); + let now = Instant::now(); + if (now - start).as_millis() > 250 { + let s = &last[0..std::cmp::min(last.len(), 60)]; + let s = format!( + "\r{:12} per second | {total_found:6}/{hash_count} found | {s:<60}", + total_count * 4 + ); writer.write_all(s.as_bytes()).unwrap(); total_count = 0; + start = now; } } }) @@ -158,7 +153,7 @@ fn make_info_printer(rx: Receiver<(usize, usize)>, hash_count: usize) -> JoinHan fn make_stdout_printer(rx: Receiver>) -> JoinHandle<()> { std::thread::spawn(move || { - let mut writer = std::io::stdout(); + let mut writer = BufWriter::new(std::io::stdout()); while let Ok(buf) = rx.recv() { writer.write_all(&buf).unwrap(); @@ -172,7 +167,7 @@ struct State { words: Arc>, delimiters_len: usize, stdout_tx: Sender>, - info_tx: Sender<(usize, usize)>, + info_tx: Sender<(usize, usize, String)>, } fn make_worker(rx: Receiver>, state: State) -> JoinHandle<()> { @@ -186,7 +181,6 @@ fn make_worker(rx: Receiver>, state: State) -> JoinHandle<()> { let mut found = 0; let mut buf = Vec::with_capacity(1024); - // while let Some(indices) = find_task(local, global, &[]) { while let Ok(indices) = rx.recv() { let sequence = indices.iter().map(|i| words[*i].as_str()); @@ -224,7 +218,7 @@ fn make_worker(rx: Receiver>, state: State) -> JoinHandle<()> { found += 1; buf.push(LINE_FEED); - if let Err(_) = state.stdout_tx.send(buf.clone()) { + if state.stdout_tx.send(buf.clone()).is_err() { return; } } else { @@ -250,7 +244,7 @@ fn make_worker(rx: Receiver>, state: State) -> JoinHandle<()> { found += 1; buf.push(LINE_FEED); - if let Err(_) = state.stdout_tx.send(buf.clone()) { + if state.stdout_tx.send(buf.clone()).is_err() { return; } } else { @@ -261,30 +255,22 @@ fn make_worker(rx: Receiver>, state: State) -> JoinHandle<()> { } } - if count >= 1024 * 1024 { - let _ = state.info_tx.send((count, found)); + if count >= 2 * 1024 * 1024 { + // The last prefix in the set is the one that will stay in the buffer + // when we're about to print here. + // So we strip that, to show just the generated part. + // We also restrict the length to stay on a single line. + let prefix_len = PREFIXES[28].len(); + // No need to wait for this + let _ = state.info_tx.try_send(( + count, + found, + String::from_utf8_lossy(&buf[prefix_len..]).to_string(), + )); + + count = 0; + found = 0; } - - // let dur = Instant::now() - start; - // if dur.as_secs() >= 1 { - // let hashes_len = hashes.len(); - // let s = String::from_utf8_lossy(&buf); - // // The last prefix in the set is the one that will stay in the buffer - // // when we're about to print here. - // // So we strip that, to show just the generated part. - // // We also restrict the length to stay on a single line. - // let prefix_len = prefixes[28].len(); - // let s = s[prefix_len..std::cmp::min(s.len(), prefix_len + 60)] - // .trim_end() - // .to_string(); - // info_tx.send(format!( - // "\r{:8} hashes per second | {:6}/{} found | {:<60}", - // count, found, hashes_len, s - // )); - - // start = Instant::now(); - // count = 0; - // } } }) } @@ -430,9 +416,9 @@ pub(crate) fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { }; tracing::debug!("{:?}", delimiter_lists); - let (info_tx, info_rx) = unbounded(); + let (info_tx, info_rx) = bounded(100); let (stdout_tx, stdout_rx) = unbounded::>(); - let (task_tx, task_rx) = bounded::>(100); + let (task_tx, task_rx) = bounded::>(num_threads * 4); let mut handles = Vec::new(); for _ in 0..num_threads { @@ -456,7 +442,7 @@ pub(crate) fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { drop(stdout_tx); drop(info_tx); - // handles.push(make_info_printer(info_rx, hashes.len())); + handles.push(make_info_printer(info_rx, hashes.len())); handles.push(make_stdout_printer(stdout_rx)); let mut indices = @@ -508,8 +494,6 @@ pub(crate) fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { // complete as well. drop(task_tx); - tracing::debug!("Wainting for workers to finish."); - for handle in handles { match handle.join() { Ok(_) => {} @@ -523,5 +507,7 @@ pub(crate) fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { } } + let _ = std::io::stdout().write_all("\r".as_bytes()); + Ok(()) } From 6ada4c1c43298c11593422b0c0aa2330738ae5fe Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 20 Sep 2023 11:33:24 +0200 Subject: [PATCH 09/99] sdk: Add additional brute force prefixes --- crates/dtmt/src/cmd/experiment/brute_force_words.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/dtmt/src/cmd/experiment/brute_force_words.rs b/crates/dtmt/src/cmd/experiment/brute_force_words.rs index 4bf8556..26d887f 100644 --- a/crates/dtmt/src/cmd/experiment/brute_force_words.rs +++ b/crates/dtmt/src/cmd/experiment/brute_force_words.rs @@ -90,13 +90,14 @@ const LINE_FEED: u8 = 0x0A; const UNDERSCORE: u8 = 0x5F; const ZERO: u8 = 0x30; -const PREFIXES: [&str; 29] = [ +const PREFIXES: [&str; 36] = [ "", "content/characters/", "content/debug/", "content/decals/", "content/environment/", "content/fx/", + "content/fx/particles/", "content/gizmos/", "content/items/", "content/levels/", @@ -112,14 +113,20 @@ const PREFIXES: [&str; 29] = [ "content/vo/", "content/volume_types/", "content/weapons/", + "content/", + "core/", + "core/units/", "packages/boot_assets/", "packages/content/", "packages/game_scripts/", "packages/strings/", "packages/ui/", + "packages/", "wwise/events/", "wwise/packages/", "wwise/world_sound_fx/", + "wwise/events/weapons/", + "wwise/events/minions/", ]; fn make_info_printer(rx: Receiver<(usize, usize, String)>, hash_count: usize) -> JoinHandle<()> { @@ -153,7 +160,7 @@ fn make_info_printer(rx: Receiver<(usize, usize, String)>, hash_count: usize) -> fn make_stdout_printer(rx: Receiver>) -> JoinHandle<()> { std::thread::spawn(move || { - let mut writer = BufWriter::new(std::io::stdout()); + let mut writer = std::io::stdout(); while let Ok(buf) = rx.recv() { writer.write_all(&buf).unwrap(); @@ -260,7 +267,7 @@ fn make_worker(rx: Receiver>, state: State) -> JoinHandle<()> { // when we're about to print here. // So we strip that, to show just the generated part. // We also restrict the length to stay on a single line. - let prefix_len = PREFIXES[28].len(); + let prefix_len = PREFIXES[35].len(); // No need to wait for this let _ = state.info_tx.try_send(( count, From ae1e7e5aa6e8c0ca54da5a485cad9a2e0e64b869 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 22 Sep 2023 11:46:57 +0200 Subject: [PATCH 10/99] dtmt: Add word extraction algorithm for paths --- .../dtmt/src/cmd/experiment/extract_words.rs | 311 +++++++++++++++++- 1 file changed, 296 insertions(+), 15 deletions(-) diff --git a/crates/dtmt/src/cmd/experiment/extract_words.rs b/crates/dtmt/src/cmd/experiment/extract_words.rs index 512038d..1a8cda5 100644 --- a/crates/dtmt/src/cmd/experiment/extract_words.rs +++ b/crates/dtmt/src/cmd/experiment/extract_words.rs @@ -1,4 +1,4 @@ -use std::collections::HashSet; +use std::collections::HashMap; use std::path::PathBuf; use clap::{value_parser, Arg, ArgMatches, Command, ValueEnum}; @@ -36,7 +36,7 @@ pub(crate) fn command_definition() -> Command { ) } -#[derive(Copy, Clone, Debug, ValueEnum)] +#[derive(Copy, Clone, Debug, Eq, PartialEq, ValueEnum)] #[value(rename_all = "snake_case")] enum Algorithm { Alphabetic, @@ -45,6 +45,7 @@ enum Algorithm { Number, Hash32, Hash64, + Paths, } impl Algorithm { @@ -55,6 +56,8 @@ impl Algorithm { Self::Identifier => c.is_ascii_alphabetic(), Self::Number => c.is_numeric(), Self::Hash32 | Self::Hash64 => matches!(c, '0'..='9' | 'a'..='f' | 'A'..='F'), + // Supposed to be handled separately + Self::Paths => false, } } @@ -65,6 +68,8 @@ impl Algorithm { Self::Identifier => c.is_ascii_alphanumeric(), Self::Number => c.is_numeric(), Self::Hash32 | Self::Hash64 => matches!(c, '0'..='9' | 'a'..='f' | 'A'..='F'), + // Supposed to be handled separately + Self::Paths => false, } } @@ -76,6 +81,8 @@ impl Algorithm { Self::Number => true, Self::Hash32 => len == 8, Self::Hash64 => len == 16, + // Supposed to be handled separately + Self::Paths => false, } } } @@ -92,11 +99,274 @@ impl std::fmt::Display for Algorithm { Algorithm::Number => "number", Algorithm::Hash32 => "hash32", Algorithm::Hash64 => "hash64", + Algorithm::Paths => "paths", } ) } } +#[derive(Copy, Clone, Debug)] +enum PathState { + Begin, + PathComponent, + PathSeparator, + Boundary, + NonWord, + End, +} + +#[tracing::instrument(skip(chars))] +fn extract_paths(chars: impl Iterator) -> Vec> { + let mut chars = chars.peekable(); + + let mut state = PathState::Begin; + let mut list = Vec::new(); + let mut path = Vec::new(); + let mut word = String::new(); + + let is_boundary = |c: char| c == '\n' || c == ' ' || c == ',' || c == '\t' || c == '|'; + + 'machine: loop { + state = match state { + PathState::Begin => match chars.next() { + None => PathState::End, + Some(c) if c.is_ascii_alphabetic() => { + word.push(c); + PathState::PathComponent + } + Some(c) if is_boundary(c) => PathState::Boundary, + Some('/') => PathState::PathSeparator, + Some(_) => PathState::NonWord, + }, + PathState::PathComponent => match chars.next() { + None => { + path.push(word.clone()); + list.push(path.clone()); + + PathState::End + } + Some(c) if c.is_ascii_alphanumeric() || c == '_' => { + word.push(c); + PathState::PathComponent + } + Some('/') => { + path.push(word.clone()); + word.clear(); + + PathState::PathSeparator + } + Some(c) if is_boundary(c) => { + path.push(word.clone()); + list.push(path.clone()); + + path.clear(); + word.clear(); + + PathState::Boundary + } + Some(_) => { + list.push(path.clone()); + + path.clear(); + word.clear(); + + PathState::NonWord + } + }, + PathState::PathSeparator => match chars.next() { + None => { + list.push(path.clone()); + PathState::End + } + Some('/') => PathState::PathSeparator, + Some(c) if c.is_ascii_alphabetic() || c == '_' => { + word.push(c); + PathState::PathComponent + } + Some(c) if is_boundary(c) => { + list.push(path.clone()); + path.clear(); + PathState::Boundary + } + Some(_) => { + list.push(path.clone()); + path.clear(); + PathState::NonWord + } + }, + PathState::Boundary => match chars.next() { + None => PathState::End, + Some(c) if c.is_ascii_alphabetic() => { + word.push(c); + PathState::PathComponent + } + Some(c) if is_boundary(c) => PathState::Boundary, + Some(_) => PathState::NonWord, + }, + PathState::NonWord => match chars.next() { + None => PathState::End, + Some(c) if is_boundary(c) => PathState::Boundary, + Some(_) => PathState::NonWord, + }, + PathState::End => { + break 'machine; + } + } + } + + list +} + +#[tracing::instrument(skip(chars))] +fn algorithm_path_components(chars: impl Iterator, min_length: usize) { + let mut chars = chars.peekable(); + + let mut state = PathState::Begin; + let mut word = String::new(); + let mut lists = vec![HashMap::::new()]; + let mut index = 0; + + let is_boundary = |c: char| c == '\n' || c == ' ' || c == ',' || c == '\t'; + + 'machine: loop { + state = match state { + PathState::Begin => match chars.next() { + None => PathState::End, + Some(c) if c.is_ascii_alphabetic() => { + word.push(c); + PathState::PathComponent + } + Some(c) if is_boundary(c) => PathState::Boundary, + // Ignore leading path separators to not trigger the logic of advancing + // the component count + Some('/') => PathState::Boundary, + Some(_) => PathState::NonWord, + }, + PathState::PathComponent => match chars.next() { + None => PathState::End, + Some(c) if c.is_ascii_alphanumeric() || c == '_' => { + word.push(c); + PathState::PathComponent + } + Some('/') => PathState::PathSeparator, + Some(c) => { + if index > 0 && word.len() >= min_length { + let list = &mut lists[index]; + list.entry(word.clone()) + .and_modify(|count| *count += 1) + .or_insert(1); + } + word.clear(); + + index = 0; + + if is_boundary(c) { + PathState::Boundary + } else { + PathState::NonWord + } + } + }, + PathState::PathSeparator => { + if word.len() >= min_length { + let list = &mut lists[index]; + list.entry(word.clone()) + .and_modify(|count| *count += 1) + .or_insert(1); + } + word.clear(); + + index += 1; + if lists.get(index).is_none() { + lists.push(HashMap::new()); + } + + // Ignore multiple separators + while chars.next_if(|c| *c == '/').is_some() {} + + match chars.next() { + None => PathState::End, + Some(c) if c.is_ascii_alphabetic() || c == '_' => { + word.push(c); + PathState::PathComponent + } + Some(c) if is_boundary(c) => { + index = 0; + PathState::Boundary + } + Some(_) => { + index = 0; + PathState::NonWord + } + } + } + PathState::Boundary => match chars.next() { + None => PathState::End, + Some(c) if c.is_ascii_alphabetic() => { + word.push(c); + PathState::PathComponent + } + Some(c) if is_boundary(c) => PathState::Boundary, + Some(_) => PathState::NonWord, + }, + PathState::NonWord => match chars.next() { + None => PathState::End, + Some(c) if is_boundary(c) => PathState::Boundary, + Some(_) => PathState::NonWord, + }, + PathState::End => { + if word.len() >= min_length { + let list = &mut lists[index]; + list.entry(word.clone()) + .and_modify(|count| *count += 1) + .or_insert(1); + } + + break 'machine; + } + } + } + + for i in 0..lists.len() { + print!("Word {i}, Count {i},"); + } + println!(); + + let mut lines: Vec>> = Vec::new(); + + for (i, list) in lists.into_iter().enumerate() { + let mut entries = list.into_iter().collect::>(); + entries.sort_by(|(_, a), (_, b)| b.partial_cmp(a).unwrap()); + + for (j, (word, count)) in entries.into_iter().enumerate() { + if let Some(line) = lines.get_mut(j) { + while line.len() < i { + line.push(None); + } + line.push(Some((word, count))); + } else { + let mut line = Vec::new(); + while line.len() < i { + line.push(None); + } + line.push(Some((word, count))); + lines.push(line); + } + } + } + + for line in lines.iter() { + for cell in line.iter() { + if let Some((word, count)) = cell { + print!("{},{},", word, count); + } else { + print!(",,"); + } + } + println!(); + } +} + #[derive(Copy, Clone, Debug)] enum State { Begin, @@ -125,9 +395,14 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; let mut chars = content.chars(); + if *algorithm == Algorithm::Paths { + algorithm_path_components(chars, min_length); + return Ok(()); + } + let mut state = State::Begin; let mut word = String::new(); - let mut visited = HashSet::new(); + let mut visited = HashMap::new(); 'machine: loop { state = match state { @@ -150,12 +425,11 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> }, State::Word => match chars.next() { None => { - if word.len() >= min_length - && algorithm.is_length(word.len()) - && !visited.contains(&word) - { - println!("{}", &word); - visited.insert(word.clone()); + if word.len() >= min_length && algorithm.is_length(word.len()) { + visited + .entry(word.clone()) + .and_modify(|v| *v += 1) + .or_insert(1); } State::End } @@ -164,12 +438,11 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> State::Word } Some(_) => { - if word.len() >= min_length - && algorithm.is_length(word.len()) - && !visited.contains(&word) - { - println!("{}", &word); - visited.insert(word.clone()); + if word.len() >= min_length && algorithm.is_length(word.len()) { + visited + .entry(word.clone()) + .and_modify(|v| *v += 1) + .or_insert(1); } word.clear(); State::NonWord @@ -178,5 +451,13 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> } } + let mut entries: Vec<(String, usize)> = visited.into_iter().collect(); + // Reverse sides during comparison to get "highest to lowest" + entries.sort_by(|(_, a), (_, b)| b.partial_cmp(a).unwrap()); + + entries + .iter() + .for_each(|(word, count)| println!("{:016} {}", word, count)); + Ok(()) } From b7e26eee5754ac1272a297e5752d21f861e9e410 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 3 Mar 2023 15:32:41 +0100 Subject: [PATCH 11/99] refactor(sdk): Split BundleFileType into its own file --- lib/sdk/src/bundle/database.rs | 2 +- lib/sdk/src/bundle/file.rs | 397 +------------------------------ lib/sdk/src/bundle/filetype.rs | 400 ++++++++++++++++++++++++++++++++ lib/sdk/src/bundle/mod.rs | 4 +- lib/sdk/src/filetype/package.rs | 11 +- 5 files changed, 408 insertions(+), 406 deletions(-) create mode 100644 lib/sdk/src/bundle/filetype.rs diff --git a/lib/sdk/src/bundle/database.rs b/lib/sdk/src/bundle/database.rs index 6152ede..fce26ee 100644 --- a/lib/sdk/src/bundle/database.rs +++ b/lib/sdk/src/bundle/database.rs @@ -13,7 +13,7 @@ use crate::binary::ToBinary; use crate::murmur::Murmur64; use crate::Bundle; -use super::file::BundleFileType; +use super::filetype::BundleFileType; const DATABASE_VERSION: u32 = 0x6; const FILE_VERSION: u32 = 0x4; diff --git a/lib/sdk/src/bundle/file.rs b/lib/sdk/src/bundle/file.rs index 4d6c56e..1780a5d 100644 --- a/lib/sdk/src/bundle/file.rs +++ b/lib/sdk/src/bundle/file.rs @@ -5,407 +5,12 @@ use bitflags::bitflags; use color_eyre::eyre::Context; use color_eyre::{eyre, Result}; use futures::future::join_all; -use serde::Serialize; use crate::binary::sync::*; use crate::filetype::*; use crate::murmur::{HashGroup, IdString64, Murmur64}; -#[derive(Debug, Hash, PartialEq, Eq, Copy, Clone)] -pub enum BundleFileType { - Animation, - AnimationCurves, - Apb, - BakedLighting, - Bik, - BlendSet, - Bones, - Chroma, - CommonPackage, - Config, - Crypto, - Data, - Entity, - Flow, - Font, - Ies, - Ini, - Input, - Ivf, - Keys, - Level, - Lua, - Material, - Mod, - MouseCursor, - NavData, - NetworkConfig, - OddleNet, - Package, - Particles, - PhysicsProperties, - RenderConfig, - RtPipeline, - Scene, - Shader, - ShaderLibrary, - ShaderLibraryGroup, - ShadingEnvionmentMapping, - ShadingEnvironment, - Slug, - SlugAlbum, - SoundEnvironment, - SpuJob, - StateMachine, - StaticPVS, - Strings, - SurfaceProperties, - Texture, - TimpaniBank, - TimpaniMaster, - Tome, - Ugg, - Unit, - Upb, - VectorField, - Wav, - WwiseBank, - WwiseDep, - WwiseEvent, - WwiseMetadata, - WwiseStream, - Xml, - - Unknown(Murmur64), -} - -impl BundleFileType { - pub fn ext_name(&self) -> String { - match self { - BundleFileType::AnimationCurves => String::from("animation_curves"), - BundleFileType::Animation => String::from("animation"), - BundleFileType::Apb => String::from("apb"), - BundleFileType::BakedLighting => String::from("baked_lighting"), - BundleFileType::Bik => String::from("bik"), - BundleFileType::BlendSet => String::from("blend_set"), - BundleFileType::Bones => String::from("bones"), - BundleFileType::Chroma => String::from("chroma"), - BundleFileType::CommonPackage => String::from("common_package"), - BundleFileType::Config => String::from("config"), - BundleFileType::Crypto => String::from("crypto"), - BundleFileType::Data => String::from("data"), - BundleFileType::Entity => String::from("entity"), - BundleFileType::Flow => String::from("flow"), - BundleFileType::Font => String::from("font"), - BundleFileType::Ies => String::from("ies"), - BundleFileType::Ini => String::from("ini"), - BundleFileType::Input => String::from("input"), - BundleFileType::Ivf => String::from("ivf"), - BundleFileType::Keys => String::from("keys"), - BundleFileType::Level => String::from("level"), - BundleFileType::Lua => String::from("lua"), - BundleFileType::Material => String::from("material"), - BundleFileType::Mod => String::from("mod"), - BundleFileType::MouseCursor => String::from("mouse_cursor"), - BundleFileType::NavData => String::from("nav_data"), - BundleFileType::NetworkConfig => String::from("network_config"), - BundleFileType::OddleNet => String::from("oodle_net"), - BundleFileType::Package => String::from("package"), - BundleFileType::Particles => String::from("particles"), - BundleFileType::PhysicsProperties => String::from("physics_properties"), - BundleFileType::RenderConfig => String::from("render_config"), - BundleFileType::RtPipeline => String::from("rt_pipeline"), - BundleFileType::Scene => String::from("scene"), - BundleFileType::ShaderLibraryGroup => String::from("shader_library_group"), - BundleFileType::ShaderLibrary => String::from("shader_library"), - BundleFileType::Shader => String::from("shader"), - BundleFileType::ShadingEnvionmentMapping => String::from("shading_environment_mapping"), - BundleFileType::ShadingEnvironment => String::from("shading_environment"), - BundleFileType::SlugAlbum => String::from("slug_album"), - BundleFileType::Slug => String::from("slug"), - BundleFileType::SoundEnvironment => String::from("sound_environment"), - BundleFileType::SpuJob => String::from("spu_job"), - BundleFileType::StateMachine => String::from("state_machine"), - BundleFileType::StaticPVS => String::from("static_pvs"), - BundleFileType::Strings => String::from("strings"), - BundleFileType::SurfaceProperties => String::from("surface_properties"), - BundleFileType::Texture => String::from("texture"), - BundleFileType::TimpaniBank => String::from("timpani_bank"), - BundleFileType::TimpaniMaster => String::from("timpani_master"), - BundleFileType::Tome => String::from("tome"), - BundleFileType::Ugg => String::from("ugg"), - BundleFileType::Unit => String::from("unit"), - BundleFileType::Upb => String::from("upb"), - BundleFileType::VectorField => String::from("vector_field"), - BundleFileType::Wav => String::from("wav"), - BundleFileType::WwiseBank => String::from("wwise_bank"), - BundleFileType::WwiseDep => String::from("wwise_dep"), - BundleFileType::WwiseEvent => String::from("wwise_event"), - BundleFileType::WwiseMetadata => String::from("wwise_metadata"), - BundleFileType::WwiseStream => String::from("wwise_stream"), - BundleFileType::Xml => String::from("xml"), - - BundleFileType::Unknown(s) => format!("{s:016X}"), - } - } - - pub fn decompiled_ext_name(&self) -> String { - match self { - BundleFileType::Texture => String::from("dds"), - BundleFileType::WwiseBank => String::from("bnk"), - BundleFileType::WwiseStream => String::from("ogg"), - _ => self.ext_name(), - } - } - - pub fn hash(&self) -> Murmur64 { - Murmur64::from(*self) - } -} - -impl std::str::FromStr for BundleFileType { - type Err = color_eyre::Report; - - fn from_str(s: &str) -> Result { - let val = match s { - "animation_curves" => BundleFileType::AnimationCurves, - "animation" => BundleFileType::Animation, - "apb" => BundleFileType::Apb, - "baked_lighting" => BundleFileType::BakedLighting, - "bik" => BundleFileType::Bik, - "blend_set" => BundleFileType::BlendSet, - "bones" => BundleFileType::Bones, - "chroma" => BundleFileType::Chroma, - "common_package" => BundleFileType::CommonPackage, - "config" => BundleFileType::Config, - "crypto" => BundleFileType::Crypto, - "data" => BundleFileType::Data, - "entity" => BundleFileType::Entity, - "flow" => BundleFileType::Flow, - "font" => BundleFileType::Font, - "ies" => BundleFileType::Ies, - "ini" => BundleFileType::Ini, - "input" => BundleFileType::Input, - "ivf" => BundleFileType::Ivf, - "keys" => BundleFileType::Keys, - "level" => BundleFileType::Level, - "lua" => BundleFileType::Lua, - "material" => BundleFileType::Material, - "mod" => BundleFileType::Mod, - "mouse_cursor" => BundleFileType::MouseCursor, - "nav_data" => BundleFileType::NavData, - "network_config" => BundleFileType::NetworkConfig, - "oodle_net" => BundleFileType::OddleNet, - "package" => BundleFileType::Package, - "particles" => BundleFileType::Particles, - "physics_properties" => BundleFileType::PhysicsProperties, - "render_config" => BundleFileType::RenderConfig, - "rt_pipeline" => BundleFileType::RtPipeline, - "scene" => BundleFileType::Scene, - "shader_library_group" => BundleFileType::ShaderLibraryGroup, - "shader_library" => BundleFileType::ShaderLibrary, - "shader" => BundleFileType::Shader, - "shading_environment_mapping" => BundleFileType::ShadingEnvionmentMapping, - "shading_environment" => BundleFileType::ShadingEnvironment, - "slug_album" => BundleFileType::SlugAlbum, - "slug" => BundleFileType::Slug, - "sound_environment" => BundleFileType::SoundEnvironment, - "spu_job" => BundleFileType::SpuJob, - "state_machine" => BundleFileType::StateMachine, - "static_pvs" => BundleFileType::StaticPVS, - "strings" => BundleFileType::Strings, - "surface_properties" => BundleFileType::SurfaceProperties, - "texture" => BundleFileType::Texture, - "timpani_bank" => BundleFileType::TimpaniBank, - "timpani_master" => BundleFileType::TimpaniMaster, - "tome" => BundleFileType::Tome, - "ugg" => BundleFileType::Ugg, - "unit" => BundleFileType::Unit, - "upb" => BundleFileType::Upb, - "vector_field" => BundleFileType::VectorField, - "wav" => BundleFileType::Wav, - "wwise_bank" => BundleFileType::WwiseBank, - "wwise_dep" => BundleFileType::WwiseDep, - "wwise_event" => BundleFileType::WwiseEvent, - "wwise_metadata" => BundleFileType::WwiseMetadata, - "wwise_stream" => BundleFileType::WwiseStream, - "xml" => BundleFileType::Xml, - s => eyre::bail!("Unknown type string '{}'", s), - }; - - Ok(val) - } -} - -impl Serialize for BundleFileType { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - let value = self.ext_name(); - value.serialize(serializer) - } -} - -impl From for BundleFileType { - fn from(value: Murmur64) -> Self { - Self::from(Into::::into(value)) - } -} - -impl From for BundleFileType { - fn from(hash: u64) -> BundleFileType { - match hash { - 0x931e336d7646cc26 => BundleFileType::Animation, - 0xdcfb9e18fff13984 => BundleFileType::AnimationCurves, - 0x3eed05ba83af5090 => BundleFileType::Apb, - 0x7ffdb779b04e4ed1 => BundleFileType::BakedLighting, - 0xaa5965f03029fa18 => BundleFileType::Bik, - 0xe301e8af94e3b5a3 => BundleFileType::BlendSet, - 0x18dead01056b72e9 => BundleFileType::Bones, - 0xb7893adf7567506a => BundleFileType::Chroma, - 0xfe9754bd19814a47 => BundleFileType::CommonPackage, - 0x82645835e6b73232 => BundleFileType::Config, - 0x69108ded1e3e634b => BundleFileType::Crypto, - 0x8fd0d44d20650b68 => BundleFileType::Data, - 0x9831ca893b0d087d => BundleFileType::Entity, - 0x92d3ee038eeb610d => BundleFileType::Flow, - 0x9efe0a916aae7880 => BundleFileType::Font, - 0x8f7d5a2c0f967655 => BundleFileType::Ies, - 0xd526a27da14f1dc5 => BundleFileType::Ini, - 0x2bbcabe5074ade9e => BundleFileType::Input, - 0xfa4a8e091a91201e => BundleFileType::Ivf, - 0xa62f9297dc969e85 => BundleFileType::Keys, - 0x2a690fd348fe9ac5 => BundleFileType::Level, - 0xa14e8dfa2cd117e2 => BundleFileType::Lua, - 0xeac0b497876adedf => BundleFileType::Material, - 0x3fcdd69156a46417 => BundleFileType::Mod, - 0xb277b11fe4a61d37 => BundleFileType::MouseCursor, - 0x169de9566953d264 => BundleFileType::NavData, - 0x3b1fa9e8f6bac374 => BundleFileType::NetworkConfig, - 0xb0f2c12eb107f4d8 => BundleFileType::OddleNet, - 0xad9c6d9ed1e5e77a => BundleFileType::Package, - 0xa8193123526fad64 => BundleFileType::Particles, - 0xbf21403a3ab0bbb1 => BundleFileType::PhysicsProperties, - 0x27862fe24795319c => BundleFileType::RenderConfig, - 0x9ca183c2d0e76dee => BundleFileType::RtPipeline, - 0x9d0a795bfe818d19 => BundleFileType::Scene, - 0xcce8d5b5f5ae333f => BundleFileType::Shader, - 0xe5ee32a477239a93 => BundleFileType::ShaderLibrary, - 0x9e5c3cc74575aeb5 => BundleFileType::ShaderLibraryGroup, - 0x250e0a11ac8e26f8 => BundleFileType::ShadingEnvionmentMapping, - 0xfe73c7dcff8a7ca5 => BundleFileType::ShadingEnvironment, - 0xa27b4d04a9ba6f9e => BundleFileType::Slug, - 0xe9fc9ea7042e5ec0 => BundleFileType::SlugAlbum, - 0xd8b27864a97ffdd7 => BundleFileType::SoundEnvironment, - 0xf97af9983c05b950 => BundleFileType::SpuJob, - 0xa486d4045106165c => BundleFileType::StateMachine, - 0xe3f0baa17d620321 => BundleFileType::StaticPVS, - 0x0d972bab10b40fd3 => BundleFileType::Strings, - 0xad2d3fa30d9ab394 => BundleFileType::SurfaceProperties, - 0xcd4238c6a0c69e32 => BundleFileType::Texture, - 0x99736be1fff739a4 => BundleFileType::TimpaniBank, - 0x00a3e6c59a2b9c6c => BundleFileType::TimpaniMaster, - 0x19c792357c99f49b => BundleFileType::Tome, - 0x712d6e3dd1024c9c => BundleFileType::Ugg, - 0xe0a48d0be9a7453f => BundleFileType::Unit, - 0xa99510c6e86dd3c2 => BundleFileType::Upb, - 0xf7505933166d6755 => BundleFileType::VectorField, - 0x786f65c00a816b19 => BundleFileType::Wav, - 0x535a7bd3e650d799 => BundleFileType::WwiseBank, - 0xaf32095c82f2b070 => BundleFileType::WwiseDep, - 0xaabdd317b58dfc8a => BundleFileType::WwiseEvent, - 0xd50a8b7e1c82b110 => BundleFileType::WwiseMetadata, - 0x504b55235d21440e => BundleFileType::WwiseStream, - 0x76015845a6003765 => BundleFileType::Xml, - - _ => BundleFileType::Unknown(Murmur64::from(hash)), - } - } -} - -impl From for u64 { - fn from(t: BundleFileType) -> u64 { - match t { - BundleFileType::Animation => 0x931e336d7646cc26, - BundleFileType::AnimationCurves => 0xdcfb9e18fff13984, - BundleFileType::Apb => 0x3eed05ba83af5090, - BundleFileType::BakedLighting => 0x7ffdb779b04e4ed1, - BundleFileType::Bik => 0xaa5965f03029fa18, - BundleFileType::BlendSet => 0xe301e8af94e3b5a3, - BundleFileType::Bones => 0x18dead01056b72e9, - BundleFileType::Chroma => 0xb7893adf7567506a, - BundleFileType::CommonPackage => 0xfe9754bd19814a47, - BundleFileType::Config => 0x82645835e6b73232, - BundleFileType::Crypto => 0x69108ded1e3e634b, - BundleFileType::Data => 0x8fd0d44d20650b68, - BundleFileType::Entity => 0x9831ca893b0d087d, - BundleFileType::Flow => 0x92d3ee038eeb610d, - BundleFileType::Font => 0x9efe0a916aae7880, - BundleFileType::Ies => 0x8f7d5a2c0f967655, - BundleFileType::Ini => 0xd526a27da14f1dc5, - BundleFileType::Input => 0x2bbcabe5074ade9e, - BundleFileType::Ivf => 0xfa4a8e091a91201e, - BundleFileType::Keys => 0xa62f9297dc969e85, - BundleFileType::Level => 0x2a690fd348fe9ac5, - BundleFileType::Lua => 0xa14e8dfa2cd117e2, - BundleFileType::Material => 0xeac0b497876adedf, - BundleFileType::Mod => 0x3fcdd69156a46417, - BundleFileType::MouseCursor => 0xb277b11fe4a61d37, - BundleFileType::NavData => 0x169de9566953d264, - BundleFileType::NetworkConfig => 0x3b1fa9e8f6bac374, - BundleFileType::OddleNet => 0xb0f2c12eb107f4d8, - BundleFileType::Package => 0xad9c6d9ed1e5e77a, - BundleFileType::Particles => 0xa8193123526fad64, - BundleFileType::PhysicsProperties => 0xbf21403a3ab0bbb1, - BundleFileType::RenderConfig => 0x27862fe24795319c, - BundleFileType::RtPipeline => 0x9ca183c2d0e76dee, - BundleFileType::Scene => 0x9d0a795bfe818d19, - BundleFileType::Shader => 0xcce8d5b5f5ae333f, - BundleFileType::ShaderLibrary => 0xe5ee32a477239a93, - BundleFileType::ShaderLibraryGroup => 0x9e5c3cc74575aeb5, - BundleFileType::ShadingEnvionmentMapping => 0x250e0a11ac8e26f8, - BundleFileType::ShadingEnvironment => 0xfe73c7dcff8a7ca5, - BundleFileType::Slug => 0xa27b4d04a9ba6f9e, - BundleFileType::SlugAlbum => 0xe9fc9ea7042e5ec0, - BundleFileType::SoundEnvironment => 0xd8b27864a97ffdd7, - BundleFileType::SpuJob => 0xf97af9983c05b950, - BundleFileType::StateMachine => 0xa486d4045106165c, - BundleFileType::StaticPVS => 0xe3f0baa17d620321, - BundleFileType::Strings => 0x0d972bab10b40fd3, - BundleFileType::SurfaceProperties => 0xad2d3fa30d9ab394, - BundleFileType::Texture => 0xcd4238c6a0c69e32, - BundleFileType::TimpaniBank => 0x99736be1fff739a4, - BundleFileType::TimpaniMaster => 0x00a3e6c59a2b9c6c, - BundleFileType::Tome => 0x19c792357c99f49b, - BundleFileType::Ugg => 0x712d6e3dd1024c9c, - BundleFileType::Unit => 0xe0a48d0be9a7453f, - BundleFileType::Upb => 0xa99510c6e86dd3c2, - BundleFileType::VectorField => 0xf7505933166d6755, - BundleFileType::Wav => 0x786f65c00a816b19, - BundleFileType::WwiseBank => 0x535a7bd3e650d799, - BundleFileType::WwiseDep => 0xaf32095c82f2b070, - BundleFileType::WwiseEvent => 0xaabdd317b58dfc8a, - BundleFileType::WwiseMetadata => 0xd50a8b7e1c82b110, - BundleFileType::WwiseStream => 0x504b55235d21440e, - BundleFileType::Xml => 0x76015845a6003765, - - BundleFileType::Unknown(hash) => hash.into(), - } - } -} -impl From for Murmur64 { - fn from(t: BundleFileType) -> Murmur64 { - let hash: u64 = t.into(); - Murmur64::from(hash) - } -} - -impl std::fmt::Display for BundleFileType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.ext_name()) - } -} +use super::filetype::BundleFileType; #[derive(Debug)] struct BundleFileHeader { diff --git a/lib/sdk/src/bundle/filetype.rs b/lib/sdk/src/bundle/filetype.rs new file mode 100644 index 0000000..0b4f292 --- /dev/null +++ b/lib/sdk/src/bundle/filetype.rs @@ -0,0 +1,400 @@ +use color_eyre::{eyre, Result}; +use serde::Serialize; + +use crate::murmur::Murmur64; + +#[derive(Debug, Hash, PartialEq, Eq, Copy, Clone)] +pub enum BundleFileType { + Animation, + AnimationCurves, + Apb, + BakedLighting, + Bik, + BlendSet, + Bones, + Chroma, + CommonPackage, + Config, + Crypto, + Data, + Entity, + Flow, + Font, + Ies, + Ini, + Input, + Ivf, + Keys, + Level, + Lua, + Material, + Mod, + MouseCursor, + NavData, + NetworkConfig, + OddleNet, + Package, + Particles, + PhysicsProperties, + RenderConfig, + RtPipeline, + Scene, + Shader, + ShaderLibrary, + ShaderLibraryGroup, + ShadingEnvionmentMapping, + ShadingEnvironment, + Slug, + SlugAlbum, + SoundEnvironment, + SpuJob, + StateMachine, + StaticPVS, + Strings, + SurfaceProperties, + Texture, + TimpaniBank, + TimpaniMaster, + Tome, + Ugg, + Unit, + Upb, + VectorField, + Wav, + WwiseBank, + WwiseDep, + WwiseEvent, + WwiseMetadata, + WwiseStream, + Xml, + + Unknown(Murmur64), +} + +impl BundleFileType { + pub fn ext_name(&self) -> String { + match self { + BundleFileType::AnimationCurves => String::from("animation_curves"), + BundleFileType::Animation => String::from("animation"), + BundleFileType::Apb => String::from("apb"), + BundleFileType::BakedLighting => String::from("baked_lighting"), + BundleFileType::Bik => String::from("bik"), + BundleFileType::BlendSet => String::from("blend_set"), + BundleFileType::Bones => String::from("bones"), + BundleFileType::Chroma => String::from("chroma"), + BundleFileType::CommonPackage => String::from("common_package"), + BundleFileType::Config => String::from("config"), + BundleFileType::Crypto => String::from("crypto"), + BundleFileType::Data => String::from("data"), + BundleFileType::Entity => String::from("entity"), + BundleFileType::Flow => String::from("flow"), + BundleFileType::Font => String::from("font"), + BundleFileType::Ies => String::from("ies"), + BundleFileType::Ini => String::from("ini"), + BundleFileType::Input => String::from("input"), + BundleFileType::Ivf => String::from("ivf"), + BundleFileType::Keys => String::from("keys"), + BundleFileType::Level => String::from("level"), + BundleFileType::Lua => String::from("lua"), + BundleFileType::Material => String::from("material"), + BundleFileType::Mod => String::from("mod"), + BundleFileType::MouseCursor => String::from("mouse_cursor"), + BundleFileType::NavData => String::from("nav_data"), + BundleFileType::NetworkConfig => String::from("network_config"), + BundleFileType::OddleNet => String::from("oodle_net"), + BundleFileType::Package => String::from("package"), + BundleFileType::Particles => String::from("particles"), + BundleFileType::PhysicsProperties => String::from("physics_properties"), + BundleFileType::RenderConfig => String::from("render_config"), + BundleFileType::RtPipeline => String::from("rt_pipeline"), + BundleFileType::Scene => String::from("scene"), + BundleFileType::ShaderLibraryGroup => String::from("shader_library_group"), + BundleFileType::ShaderLibrary => String::from("shader_library"), + BundleFileType::Shader => String::from("shader"), + BundleFileType::ShadingEnvionmentMapping => String::from("shading_environment_mapping"), + BundleFileType::ShadingEnvironment => String::from("shading_environment"), + BundleFileType::SlugAlbum => String::from("slug_album"), + BundleFileType::Slug => String::from("slug"), + BundleFileType::SoundEnvironment => String::from("sound_environment"), + BundleFileType::SpuJob => String::from("spu_job"), + BundleFileType::StateMachine => String::from("state_machine"), + BundleFileType::StaticPVS => String::from("static_pvs"), + BundleFileType::Strings => String::from("strings"), + BundleFileType::SurfaceProperties => String::from("surface_properties"), + BundleFileType::Texture => String::from("texture"), + BundleFileType::TimpaniBank => String::from("timpani_bank"), + BundleFileType::TimpaniMaster => String::from("timpani_master"), + BundleFileType::Tome => String::from("tome"), + BundleFileType::Ugg => String::from("ugg"), + BundleFileType::Unit => String::from("unit"), + BundleFileType::Upb => String::from("upb"), + BundleFileType::VectorField => String::from("vector_field"), + BundleFileType::Wav => String::from("wav"), + BundleFileType::WwiseBank => String::from("wwise_bank"), + BundleFileType::WwiseDep => String::from("wwise_dep"), + BundleFileType::WwiseEvent => String::from("wwise_event"), + BundleFileType::WwiseMetadata => String::from("wwise_metadata"), + BundleFileType::WwiseStream => String::from("wwise_stream"), + BundleFileType::Xml => String::from("xml"), + + BundleFileType::Unknown(s) => format!("{s:016X}"), + } + } + + pub fn decompiled_ext_name(&self) -> String { + match self { + BundleFileType::Texture => String::from("dds"), + BundleFileType::WwiseBank => String::from("bnk"), + BundleFileType::WwiseStream => String::from("ogg"), + _ => self.ext_name(), + } + } + + pub fn hash(&self) -> Murmur64 { + Murmur64::from(*self) + } +} + +impl std::str::FromStr for BundleFileType { + type Err = color_eyre::Report; + + fn from_str(s: &str) -> Result { + let val = match s { + "animation_curves" => BundleFileType::AnimationCurves, + "animation" => BundleFileType::Animation, + "apb" => BundleFileType::Apb, + "baked_lighting" => BundleFileType::BakedLighting, + "bik" => BundleFileType::Bik, + "blend_set" => BundleFileType::BlendSet, + "bones" => BundleFileType::Bones, + "chroma" => BundleFileType::Chroma, + "common_package" => BundleFileType::CommonPackage, + "config" => BundleFileType::Config, + "crypto" => BundleFileType::Crypto, + "data" => BundleFileType::Data, + "entity" => BundleFileType::Entity, + "flow" => BundleFileType::Flow, + "font" => BundleFileType::Font, + "ies" => BundleFileType::Ies, + "ini" => BundleFileType::Ini, + "input" => BundleFileType::Input, + "ivf" => BundleFileType::Ivf, + "keys" => BundleFileType::Keys, + "level" => BundleFileType::Level, + "lua" => BundleFileType::Lua, + "material" => BundleFileType::Material, + "mod" => BundleFileType::Mod, + "mouse_cursor" => BundleFileType::MouseCursor, + "nav_data" => BundleFileType::NavData, + "network_config" => BundleFileType::NetworkConfig, + "oodle_net" => BundleFileType::OddleNet, + "package" => BundleFileType::Package, + "particles" => BundleFileType::Particles, + "physics_properties" => BundleFileType::PhysicsProperties, + "render_config" => BundleFileType::RenderConfig, + "rt_pipeline" => BundleFileType::RtPipeline, + "scene" => BundleFileType::Scene, + "shader_library_group" => BundleFileType::ShaderLibraryGroup, + "shader_library" => BundleFileType::ShaderLibrary, + "shader" => BundleFileType::Shader, + "shading_environment_mapping" => BundleFileType::ShadingEnvionmentMapping, + "shading_environment" => BundleFileType::ShadingEnvironment, + "slug_album" => BundleFileType::SlugAlbum, + "slug" => BundleFileType::Slug, + "sound_environment" => BundleFileType::SoundEnvironment, + "spu_job" => BundleFileType::SpuJob, + "state_machine" => BundleFileType::StateMachine, + "static_pvs" => BundleFileType::StaticPVS, + "strings" => BundleFileType::Strings, + "surface_properties" => BundleFileType::SurfaceProperties, + "texture" => BundleFileType::Texture, + "timpani_bank" => BundleFileType::TimpaniBank, + "timpani_master" => BundleFileType::TimpaniMaster, + "tome" => BundleFileType::Tome, + "ugg" => BundleFileType::Ugg, + "unit" => BundleFileType::Unit, + "upb" => BundleFileType::Upb, + "vector_field" => BundleFileType::VectorField, + "wav" => BundleFileType::Wav, + "wwise_bank" => BundleFileType::WwiseBank, + "wwise_dep" => BundleFileType::WwiseDep, + "wwise_event" => BundleFileType::WwiseEvent, + "wwise_metadata" => BundleFileType::WwiseMetadata, + "wwise_stream" => BundleFileType::WwiseStream, + "xml" => BundleFileType::Xml, + s => eyre::bail!("Unknown type string '{}'", s), + }; + + Ok(val) + } +} + +impl Serialize for BundleFileType { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + let value = self.ext_name(); + value.serialize(serializer) + } +} + +impl From for BundleFileType { + fn from(value: Murmur64) -> Self { + Self::from(Into::::into(value)) + } +} + +impl From for BundleFileType { + fn from(hash: u64) -> BundleFileType { + match hash { + 0x931e336d7646cc26 => BundleFileType::Animation, + 0xdcfb9e18fff13984 => BundleFileType::AnimationCurves, + 0x3eed05ba83af5090 => BundleFileType::Apb, + 0x7ffdb779b04e4ed1 => BundleFileType::BakedLighting, + 0xaa5965f03029fa18 => BundleFileType::Bik, + 0xe301e8af94e3b5a3 => BundleFileType::BlendSet, + 0x18dead01056b72e9 => BundleFileType::Bones, + 0xb7893adf7567506a => BundleFileType::Chroma, + 0xfe9754bd19814a47 => BundleFileType::CommonPackage, + 0x82645835e6b73232 => BundleFileType::Config, + 0x69108ded1e3e634b => BundleFileType::Crypto, + 0x8fd0d44d20650b68 => BundleFileType::Data, + 0x9831ca893b0d087d => BundleFileType::Entity, + 0x92d3ee038eeb610d => BundleFileType::Flow, + 0x9efe0a916aae7880 => BundleFileType::Font, + 0x8f7d5a2c0f967655 => BundleFileType::Ies, + 0xd526a27da14f1dc5 => BundleFileType::Ini, + 0x2bbcabe5074ade9e => BundleFileType::Input, + 0xfa4a8e091a91201e => BundleFileType::Ivf, + 0xa62f9297dc969e85 => BundleFileType::Keys, + 0x2a690fd348fe9ac5 => BundleFileType::Level, + 0xa14e8dfa2cd117e2 => BundleFileType::Lua, + 0xeac0b497876adedf => BundleFileType::Material, + 0x3fcdd69156a46417 => BundleFileType::Mod, + 0xb277b11fe4a61d37 => BundleFileType::MouseCursor, + 0x169de9566953d264 => BundleFileType::NavData, + 0x3b1fa9e8f6bac374 => BundleFileType::NetworkConfig, + 0xb0f2c12eb107f4d8 => BundleFileType::OddleNet, + 0xad9c6d9ed1e5e77a => BundleFileType::Package, + 0xa8193123526fad64 => BundleFileType::Particles, + 0xbf21403a3ab0bbb1 => BundleFileType::PhysicsProperties, + 0x27862fe24795319c => BundleFileType::RenderConfig, + 0x9ca183c2d0e76dee => BundleFileType::RtPipeline, + 0x9d0a795bfe818d19 => BundleFileType::Scene, + 0xcce8d5b5f5ae333f => BundleFileType::Shader, + 0xe5ee32a477239a93 => BundleFileType::ShaderLibrary, + 0x9e5c3cc74575aeb5 => BundleFileType::ShaderLibraryGroup, + 0x250e0a11ac8e26f8 => BundleFileType::ShadingEnvionmentMapping, + 0xfe73c7dcff8a7ca5 => BundleFileType::ShadingEnvironment, + 0xa27b4d04a9ba6f9e => BundleFileType::Slug, + 0xe9fc9ea7042e5ec0 => BundleFileType::SlugAlbum, + 0xd8b27864a97ffdd7 => BundleFileType::SoundEnvironment, + 0xf97af9983c05b950 => BundleFileType::SpuJob, + 0xa486d4045106165c => BundleFileType::StateMachine, + 0xe3f0baa17d620321 => BundleFileType::StaticPVS, + 0x0d972bab10b40fd3 => BundleFileType::Strings, + 0xad2d3fa30d9ab394 => BundleFileType::SurfaceProperties, + 0xcd4238c6a0c69e32 => BundleFileType::Texture, + 0x99736be1fff739a4 => BundleFileType::TimpaniBank, + 0x00a3e6c59a2b9c6c => BundleFileType::TimpaniMaster, + 0x19c792357c99f49b => BundleFileType::Tome, + 0x712d6e3dd1024c9c => BundleFileType::Ugg, + 0xe0a48d0be9a7453f => BundleFileType::Unit, + 0xa99510c6e86dd3c2 => BundleFileType::Upb, + 0xf7505933166d6755 => BundleFileType::VectorField, + 0x786f65c00a816b19 => BundleFileType::Wav, + 0x535a7bd3e650d799 => BundleFileType::WwiseBank, + 0xaf32095c82f2b070 => BundleFileType::WwiseDep, + 0xaabdd317b58dfc8a => BundleFileType::WwiseEvent, + 0xd50a8b7e1c82b110 => BundleFileType::WwiseMetadata, + 0x504b55235d21440e => BundleFileType::WwiseStream, + 0x76015845a6003765 => BundleFileType::Xml, + + _ => BundleFileType::Unknown(Murmur64::from(hash)), + } + } +} + +impl From for u64 { + fn from(t: BundleFileType) -> u64 { + match t { + BundleFileType::Animation => 0x931e336d7646cc26, + BundleFileType::AnimationCurves => 0xdcfb9e18fff13984, + BundleFileType::Apb => 0x3eed05ba83af5090, + BundleFileType::BakedLighting => 0x7ffdb779b04e4ed1, + BundleFileType::Bik => 0xaa5965f03029fa18, + BundleFileType::BlendSet => 0xe301e8af94e3b5a3, + BundleFileType::Bones => 0x18dead01056b72e9, + BundleFileType::Chroma => 0xb7893adf7567506a, + BundleFileType::CommonPackage => 0xfe9754bd19814a47, + BundleFileType::Config => 0x82645835e6b73232, + BundleFileType::Crypto => 0x69108ded1e3e634b, + BundleFileType::Data => 0x8fd0d44d20650b68, + BundleFileType::Entity => 0x9831ca893b0d087d, + BundleFileType::Flow => 0x92d3ee038eeb610d, + BundleFileType::Font => 0x9efe0a916aae7880, + BundleFileType::Ies => 0x8f7d5a2c0f967655, + BundleFileType::Ini => 0xd526a27da14f1dc5, + BundleFileType::Input => 0x2bbcabe5074ade9e, + BundleFileType::Ivf => 0xfa4a8e091a91201e, + BundleFileType::Keys => 0xa62f9297dc969e85, + BundleFileType::Level => 0x2a690fd348fe9ac5, + BundleFileType::Lua => 0xa14e8dfa2cd117e2, + BundleFileType::Material => 0xeac0b497876adedf, + BundleFileType::Mod => 0x3fcdd69156a46417, + BundleFileType::MouseCursor => 0xb277b11fe4a61d37, + BundleFileType::NavData => 0x169de9566953d264, + BundleFileType::NetworkConfig => 0x3b1fa9e8f6bac374, + BundleFileType::OddleNet => 0xb0f2c12eb107f4d8, + BundleFileType::Package => 0xad9c6d9ed1e5e77a, + BundleFileType::Particles => 0xa8193123526fad64, + BundleFileType::PhysicsProperties => 0xbf21403a3ab0bbb1, + BundleFileType::RenderConfig => 0x27862fe24795319c, + BundleFileType::RtPipeline => 0x9ca183c2d0e76dee, + BundleFileType::Scene => 0x9d0a795bfe818d19, + BundleFileType::Shader => 0xcce8d5b5f5ae333f, + BundleFileType::ShaderLibrary => 0xe5ee32a477239a93, + BundleFileType::ShaderLibraryGroup => 0x9e5c3cc74575aeb5, + BundleFileType::ShadingEnvionmentMapping => 0x250e0a11ac8e26f8, + BundleFileType::ShadingEnvironment => 0xfe73c7dcff8a7ca5, + BundleFileType::Slug => 0xa27b4d04a9ba6f9e, + BundleFileType::SlugAlbum => 0xe9fc9ea7042e5ec0, + BundleFileType::SoundEnvironment => 0xd8b27864a97ffdd7, + BundleFileType::SpuJob => 0xf97af9983c05b950, + BundleFileType::StateMachine => 0xa486d4045106165c, + BundleFileType::StaticPVS => 0xe3f0baa17d620321, + BundleFileType::Strings => 0x0d972bab10b40fd3, + BundleFileType::SurfaceProperties => 0xad2d3fa30d9ab394, + BundleFileType::Texture => 0xcd4238c6a0c69e32, + BundleFileType::TimpaniBank => 0x99736be1fff739a4, + BundleFileType::TimpaniMaster => 0x00a3e6c59a2b9c6c, + BundleFileType::Tome => 0x19c792357c99f49b, + BundleFileType::Ugg => 0x712d6e3dd1024c9c, + BundleFileType::Unit => 0xe0a48d0be9a7453f, + BundleFileType::Upb => 0xa99510c6e86dd3c2, + BundleFileType::VectorField => 0xf7505933166d6755, + BundleFileType::Wav => 0x786f65c00a816b19, + BundleFileType::WwiseBank => 0x535a7bd3e650d799, + BundleFileType::WwiseDep => 0xaf32095c82f2b070, + BundleFileType::WwiseEvent => 0xaabdd317b58dfc8a, + BundleFileType::WwiseMetadata => 0xd50a8b7e1c82b110, + BundleFileType::WwiseStream => 0x504b55235d21440e, + BundleFileType::Xml => 0x76015845a6003765, + + BundleFileType::Unknown(hash) => hash.into(), + } + } +} +impl From for Murmur64 { + fn from(t: BundleFileType) -> Murmur64 { + let hash: u64 = t.into(); + Murmur64::from(hash) + } +} + +impl std::fmt::Display for BundleFileType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.ext_name()) + } +} diff --git a/lib/sdk/src/bundle/mod.rs b/lib/sdk/src/bundle/mod.rs index 813df06..ca36393 100644 --- a/lib/sdk/src/bundle/mod.rs +++ b/lib/sdk/src/bundle/mod.rs @@ -12,8 +12,10 @@ use crate::murmur::{HashGroup, IdString64, Murmur64}; pub(crate) mod database; pub(crate) mod file; +pub(crate) mod filetype; -pub use file::{BundleFile, BundleFileType, BundleFileVariant}; +pub use file::{BundleFile, BundleFileVariant}; +pub use filetype::BundleFileType; #[derive(Clone, Copy, Debug, PartialEq, PartialOrd)] enum BundleFormat { diff --git a/lib/sdk/src/filetype/package.rs b/lib/sdk/src/filetype/package.rs index 1f50f81..a36719e 100644 --- a/lib/sdk/src/filetype/package.rs +++ b/lib/sdk/src/filetype/package.rs @@ -11,7 +11,8 @@ use path_slash::PathBufExt; use tokio::fs; use crate::binary::sync::{ReadExt, WriteExt}; -use crate::bundle::file::{BundleFileType, UserFile}; +use crate::bundle::file::UserFile; +use crate::bundle::filetype::BundleFileType; use crate::murmur::{HashGroup, Murmur64}; #[tracing::instrument] @@ -280,17 +281,11 @@ where Ok(vec![UserFile::new(s.into_bytes())]) } -// #[tracing::instrument(skip_all)] -// pub fn compile(_ctx: &crate::Context, data: String) -> Result> { -// let pkg = Package::from_sjson(data)?; -// pkg.to_binary() -// } - #[cfg(test)] mod test { use std::path::PathBuf; - use crate::BundleFileType; + use crate::bundle::filetype::BundleFileType; use super::resolve_wildcard; use super::Package; From 95fc6c160b2176770ab54c4380f208bb664b76f4 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 4 Oct 2023 09:47:25 +0200 Subject: [PATCH 12/99] dtmt: Implement name overrides For most of the game files, we don't know the actual name, only the hash of that name. To still allow building bundles that contain files with that name (e.g. to override a game file with a custom one), there needs to be a way to tell DTMT to name a file such that its hash is the same as the one in the game. The initial idea was to just expect the file name on disk to be the hash, but that wouldn't allow for arbitrary folder structures anymore. So instead, there is now a new, optional setting in `dtmt.cfg`, where the modder can map a file path to an override name. --- crates/dtmm/src/controller/deploy.rs | 8 ++-- crates/dtmm/src/controller/import.rs | 1 + crates/dtmt/src/cmd/build.rs | 68 ++++++++++++++-------------- crates/dtmt/src/cmd/migrate.rs | 1 + crates/dtmt/src/cmd/watch.rs | 17 +++---- lib/dtmt-shared/src/lib.rs | 3 ++ lib/sdk/src/bundle/file.rs | 26 ++++------- lib/sdk/src/filetype/lua.rs | 13 ++---- lib/sdk/src/filetype/package.rs | 48 +++++++++++--------- lib/sdk/src/murmur/types.rs | 28 ++++++++++-- 10 files changed, 116 insertions(+), 97 deletions(-) diff --git a/crates/dtmm/src/controller/deploy.rs b/crates/dtmm/src/controller/deploy.rs index e2d9c0e..02b6860 100644 --- a/crates/dtmm/src/controller/deploy.rs +++ b/crates/dtmm/src/controller/deploy.rs @@ -324,11 +324,11 @@ async fn build_bundles(state: Arc) -> Result> { let mut bundles = Vec::new(); - let mut add_lua_asset = |name, data: &str| { + let mut add_lua_asset = |name: &str, data: &str| { let span = tracing::info_span!("Compiling Lua", name, data_len = data.len()); let _enter = span.enter(); - let file = lua::compile(name, data).wrap_err("Failed to compile Lua")?; + let file = lua::compile(name.to_string(), data).wrap_err("Failed to compile Lua")?; mod_bundle.add_file(file); @@ -517,8 +517,8 @@ async fn patch_boot_bundle( .wrap_err("Failed to render template `mod_main.lua`")?; tracing::trace!("Main script rendered:\n===========\n{}\n=============", lua); - let file = - lua::compile(MOD_BOOT_SCRIPT, lua).wrap_err("Failed to compile mod main Lua file")?; + let file = lua::compile(MOD_BOOT_SCRIPT.to_string(), lua) + .wrap_err("Failed to compile mod main Lua file")?; boot_bundle.add_file(file); } diff --git a/crates/dtmm/src/controller/import.rs b/crates/dtmm/src/controller/import.rs index 8e47d23..2f5f90b 100644 --- a/crates/dtmm/src/controller/import.rs +++ b/crates/dtmm/src/controller/import.rs @@ -297,6 +297,7 @@ fn extract_mod_config(archive: &mut ZipArchive) -> Result<(Mo packages: Vec::new(), resources, depends: Vec::new(), + name_overrides: Default::default(), }; Ok((cfg, root)) diff --git a/crates/dtmt/src/cmd/build.rs b/crates/dtmt/src/cmd/build.rs index 77ab629..fab072b 100644 --- a/crates/dtmt/src/cmd/build.rs +++ b/crates/dtmt/src/cmd/build.rs @@ -103,38 +103,41 @@ async fn find_project_config(dir: Option) -> Result { } #[tracing::instrument(skip_all)] -async fn compile_package_files

(pkg: &Package, root: P) -> Result> -where - P: AsRef + std::fmt::Debug, -{ - let root = Arc::new(root.as_ref()); +async fn compile_package_files(pkg: &Package, cfg: &ModConfig) -> Result> { + let root = Arc::new(&cfg.dir); + let name_overrides = &cfg.name_overrides; let tasks = pkg .iter() - .flat_map(|(file_type, paths)| { - paths.iter().map(|path| { + .flat_map(|(file_type, names)| { + names.iter().map(|name| { ( *file_type, - path, + name, // Cloning the `Arc` here solves the issue that in the next `.map`, I need to // `move` the closure parameters, but can't `move` `root` before it was cloned. root.clone(), ) }) }) - .map(|(file_type, path, root)| async move { - let sjson = fs::read_to_string(&path).await?; + .map(|(file_type, name, root)| async move { + let path = PathBuf::from(name); + let sjson = fs::read_to_string(&path) + .await + .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; - let mut path = path.clone(); - path.set_extension(""); - - BundleFile::from_sjson( - path.to_slash_lossy().to_string(), - file_type, - sjson, - root.as_ref(), - ) - .await + let name = path.with_extension("").to_slash_lossy().to_string(); + let name = if let Some(new_name) = name_overrides.get(&name) { + let new_name = match u64::from_str_radix(new_name, 16) { + Ok(hash) => IdString64::from(hash), + Err(_) => IdString64::from(new_name.clone()), + }; + tracing::info!("Overriding '{}' -> '{}'", name, new_name.display()); + new_name + } else { + IdString64::from(name.clone()) + }; + BundleFile::from_sjson(name, file_type, sjson, root.as_ref()).await }); let results = futures::stream::iter(tasks) @@ -146,12 +149,11 @@ where } #[tracing::instrument] -async fn build_package(package: P1, root: P2) -> Result -where - P1: AsRef + std::fmt::Debug, - P2: AsRef + std::fmt::Debug, -{ - let root = root.as_ref(); +async fn build_package( + cfg: &ModConfig, + package: impl AsRef + std::fmt::Debug, +) -> Result { + let root = &cfg.dir; let package = package.as_ref(); let mut path = root.join(package); @@ -165,7 +167,7 @@ where .await .wrap_err_with(|| format!("Invalid package file {}", &pkg_name))?; - let files = compile_package_files(&pkg, root).await?; + let files = compile_package_files(&pkg, cfg).await?; let mut bundle = Bundle::new(pkg_name); for file in files { bundle.add_file(file); @@ -254,14 +256,14 @@ pub(crate) async fn read_project_config(dir: Option) -> Result( +#[tracing::instrument] +pub(crate) async fn build

( cfg: &ModConfig, - out_path: P1, - game_dir: Arc>, + out_path: impl AsRef + std::fmt::Debug, + game_dir: Arc>, ) -> Result<()> where - P1: AsRef, - P2: AsRef, + P: AsRef + std::fmt::Debug, { let out_path = out_path.as_ref(); @@ -286,7 +288,7 @@ where ); } - let bundle = build_package(path, &cfg.dir).await.wrap_err_with(|| { + let bundle = build_package(&cfg, path).await.wrap_err_with(|| { format!( "Failed to build package '{}' at '{}'", path.display(), diff --git a/crates/dtmt/src/cmd/migrate.rs b/crates/dtmt/src/cmd/migrate.rs index 2eacded..d7bfa19 100644 --- a/crates/dtmt/src/cmd/migrate.rs +++ b/crates/dtmt/src/cmd/migrate.rs @@ -351,6 +351,7 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> }, depends: vec![ModDependency::ID(String::from("DMF"))], bundled: true, + name_overrides: HashMap::new(), }; tracing::debug!(?dtmt_cfg); diff --git a/crates/dtmt/src/cmd/watch.rs b/crates/dtmt/src/cmd/watch.rs index 79fab67..2abd0f7 100644 --- a/crates/dtmt/src/cmd/watch.rs +++ b/crates/dtmt/src/cmd/watch.rs @@ -77,17 +77,14 @@ pub(crate) fn command_definition() -> Command { ) } -async fn compile( +#[tracing::instrument] +async fn compile( cfg: &ModConfig, - out_path: P1, - archive_path: P2, - game_dir: Arc>, -) -> Result<()> -where - P1: AsRef + std::marker::Copy, - P2: AsRef, - P3: AsRef, -{ + out_path: impl AsRef + std::fmt::Debug, + archive_path: impl AsRef + std::fmt::Debug, + game_dir: Arc + std::fmt::Debug>>, +) -> Result<()> { + let out_path = out_path.as_ref(); build(cfg, out_path, game_dir) .await .wrap_err("Failed to build bundles")?; diff --git a/lib/dtmt-shared/src/lib.rs b/lib/dtmt-shared/src/lib.rs index 3c9530e..d1f69c7 100644 --- a/lib/dtmt-shared/src/lib.rs +++ b/lib/dtmt-shared/src/lib.rs @@ -1,3 +1,4 @@ +use std::collections::HashMap; use std::path::PathBuf; use color_eyre::eyre::{OptionExt as _, WrapErr as _}; @@ -67,6 +68,8 @@ pub struct ModConfig { pub depends: Vec, #[serde(default = "default_true", skip_serializing_if = "is_true")] pub bundled: bool, + #[serde(default)] + pub name_overrides: HashMap, } pub const STEAMAPP_ID: u32 = 1361210; diff --git a/lib/sdk/src/bundle/file.rs b/lib/sdk/src/bundle/file.rs index 1780a5d..f387409 100644 --- a/lib/sdk/src/bundle/file.rs +++ b/lib/sdk/src/bundle/file.rs @@ -120,7 +120,7 @@ pub struct BundleFile { } impl BundleFile { - pub fn new(name: String, file_type: BundleFileType) -> Self { + pub fn new(name: impl Into, file_type: BundleFileType) -> Self { Self { file_type, name: name.into(), @@ -252,20 +252,15 @@ impl BundleFile { Ok(w.into_inner()) } - #[tracing::instrument(name = "File::from_sjson", skip(sjson))] - pub async fn from_sjson( - name: String, + #[tracing::instrument("File::from_sjson", skip(sjson, name), fields(name = %name.display()))] + pub async fn from_sjson( + name: IdString64, file_type: BundleFileType, - sjson: S, - root: P, - ) -> Result - where - P: AsRef + std::fmt::Debug, - S: AsRef, - { + sjson: impl AsRef, + root: impl AsRef + std::fmt::Debug, + ) -> Result { match file_type { - BundleFileType::Lua => lua::compile(name.clone(), sjson) - .wrap_err_with(|| format!("Failed to compile Lua file '{}'", name)), + BundleFileType::Lua => lua::compile(name, sjson).wrap_err("Failed to compile Lua file"), BundleFileType::Unknown(_) => { eyre::bail!("Unknown file type. Cannot compile from SJSON"); } @@ -304,10 +299,7 @@ impl BundleFile { s } - pub fn matches_name(&self, name: S) -> bool - where - S: Into, - { + pub fn matches_name(&self, name: impl Into) -> bool { let name = name.into(); if self.name == name { return true; diff --git a/lib/sdk/src/filetype/lua.rs b/lib/sdk/src/filetype/lua.rs index bfe6de7..14f0d6b 100644 --- a/lib/sdk/src/filetype/lua.rs +++ b/lib/sdk/src/filetype/lua.rs @@ -15,6 +15,7 @@ use tokio::fs; use crate::binary::sync::ReadExt; use crate::binary::sync::WriteExt; use crate::bundle::file::{BundleFileVariant, UserFile}; +use crate::murmur::IdString64; use crate::{BundleFile, BundleFileType}; const BITSQUID_LUAJIT_HEADER: u32 = 0x8253461B; @@ -117,17 +118,13 @@ where } #[tracing::instrument(skip_all)] -pub fn compile(name: S, code: C) -> Result -where - S: Into, - C: AsRef, -{ +pub fn compile(name: impl Into, code: impl AsRef) -> Result { let name = name.into(); let code = code.as_ref(); tracing::trace!( "Compiling '{}', {} bytes of code", - name, + name.display(), code.as_bytes().len() ); @@ -135,8 +132,8 @@ where let state = lua::luaL_newstate(); lua::luaL_openlibs(state); - let name = CString::new(format!("@{name}").into_bytes()) - .wrap_err_with(|| format!("Cannot convert name into CString: {}", name))?; + let name = CString::new(format!("@{}", name.display()).into_bytes()) + .wrap_err_with(|| format!("Cannot convert name into CString: {}", name.display()))?; match lua::luaL_loadbuffer( state, code.as_ptr() as _, diff --git a/lib/sdk/src/filetype/package.rs b/lib/sdk/src/filetype/package.rs index a36719e..6394e42 100644 --- a/lib/sdk/src/filetype/package.rs +++ b/lib/sdk/src/filetype/package.rs @@ -7,13 +7,12 @@ use std::str::FromStr; use async_recursion::async_recursion; use color_eyre::eyre::{self, Context}; use color_eyre::Result; -use path_slash::PathBufExt; use tokio::fs; use crate::binary::sync::{ReadExt, WriteExt}; use crate::bundle::file::UserFile; use crate::bundle::filetype::BundleFileType; -use crate::murmur::{HashGroup, Murmur64}; +use crate::murmur::{HashGroup, IdString64, Murmur64}; #[tracing::instrument] #[async_recursion] @@ -91,12 +90,12 @@ where Ok(paths) } -type PackageType = HashMap>; +type PackageType = HashMap>; type PackageDefinition = HashMap>; #[derive(Default)] pub struct Package { - _name: String, + _name: IdString64, _root: PathBuf, inner: PackageType, flags: u8, @@ -117,9 +116,9 @@ impl DerefMut for Package { } impl Package { - pub fn new(name: String, root: PathBuf) -> Self { + pub fn new(name: impl Into, root: PathBuf) -> Self { Self { - _name: name, + _name: name.into(), _root: root, inner: Default::default(), flags: 1, @@ -130,17 +129,22 @@ impl Package { self.values().fold(0, |total, files| total + files.len()) } - pub fn add_file>(&mut self, file_type: BundleFileType, name: P) { + pub fn add_file(&mut self, file_type: BundleFileType, name: impl Into) { self.inner.entry(file_type).or_default().insert(name.into()); } #[tracing::instrument("Package::from_sjson", skip(sjson), fields(sjson_len = sjson.as_ref().len()))] - pub async fn from_sjson(sjson: S, name: String, root: P) -> Result + pub async fn from_sjson( + sjson: S, + name: impl Into + std::fmt::Debug, + root: P, + ) -> Result where P: AsRef + std::fmt::Debug, S: AsRef, { let root = root.as_ref(); + let name = name.into(); let definition: PackageDefinition = serde_sjson::from_str(sjson.as_ref())?; let mut inner: PackageType = Default::default(); @@ -174,7 +178,11 @@ impl Package { continue; }; - inner.entry(t).or_default().insert(path); + tracing::debug!("Adding file {}", path.display()); + inner + .entry(t) + .or_default() + .insert(path.display().to_string()); } } } @@ -193,11 +201,9 @@ impl Package { pub fn to_sjson(&self) -> Result { let mut map: PackageDefinition = Default::default(); - for (t, paths) in self.iter() { - for path in paths.iter() { - map.entry(t.ext_name()) - .or_default() - .insert(path.display().to_string()); + for (t, names) in self.iter() { + for name in names.iter() { + map.entry(t.ext_name()).or_default().insert(name.clone()); } } @@ -223,11 +229,11 @@ impl Package { for _ in 0..file_count { let t = BundleFileType::from(r.read_u64()?); let hash = Murmur64::from(r.read_u64()?); - let path = ctx.lookup_hash(hash, HashGroup::Filename); + let name = ctx.lookup_hash(hash, HashGroup::Filename); inner .entry(t) .or_default() - .insert(PathBuf::from(path.display().to_string())); + .insert(name.display().to_string()); } let flags = r.read_u8()?; @@ -240,7 +246,7 @@ impl Package { let pkg = Self { inner, - _name: name, + _name: name.into(), _root: PathBuf::new(), flags, }; @@ -256,12 +262,10 @@ impl Package { w.write_u32(0x2b)?; w.write_u32(self.values().flatten().count() as u32)?; - for (t, paths) in self.iter() { - for path in paths.iter() { + for (t, names) in self.iter() { + for name in names.iter() { w.write_u64(t.hash().into())?; - - let hash = Murmur64::hash(path.to_slash_lossy().as_bytes()); - w.write_u64(hash.into())?; + w.write_u64(Murmur64::hash(name.as_bytes()).into())?; } } diff --git a/lib/sdk/src/murmur/types.rs b/lib/sdk/src/murmur/types.rs index e96b992..20bf46a 100644 --- a/lib/sdk/src/murmur/types.rs +++ b/lib/sdk/src/murmur/types.rs @@ -1,3 +1,7 @@ +use std::path::Path; + +use path_slash::PathExt; + use self::util::{parse_hex32, parse_hex64}; use super::*; @@ -263,11 +267,23 @@ impl IdString64 { IdString64::String(_) => false, } } + + // Would love to have this as a proper `impl From`, but + // rustc will complain that it overlaps with the `impl From>`. + pub fn from_path(p: impl AsRef) -> Self { + Self::String(p.as_ref().to_slash_lossy().to_string()) + } } -impl> From for IdString64 { - fn from(value: S) -> Self { - Self::String(value.into()) +impl From for IdString64 { + fn from(value: String) -> Self { + Self::String(value) + } +} + +impl From for IdString64 { + fn from(value: u64) -> Self { + Self::Hash(value.into()) } } @@ -283,6 +299,12 @@ impl From for Murmur64 { } } +impl Default for IdString64 { + fn default() -> Self { + Self::Hash(0.into()) + } +} + impl PartialEq for IdString64 { fn eq(&self, other: &Self) -> bool { self.to_murmur64() == other.to_murmur64() From 74a7aaa6e5dacc758a7846ab720999756203bbc6 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sat, 16 Sep 2023 18:50:40 +0200 Subject: [PATCH 13/99] dtmt-shared: Write log lines to stderr Ideally, I would prefer the usual split per logging level, but that seems to be somewhat complex with `tracing_subscriber`, so this simply switches everything over to stderr, so that some of the experiment commands can write results to stdout. --- lib/dtmt-shared/src/log.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dtmt-shared/src/log.rs b/lib/dtmt-shared/src/log.rs index ab0b7b5..9c95c63 100644 --- a/lib/dtmt-shared/src/log.rs +++ b/lib/dtmt-shared/src/log.rs @@ -84,7 +84,7 @@ pub fn create_tracing_subscriber() { EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::try_new("info").unwrap()); let (dev_stdout_layer, prod_stdout_layer, filter_layer) = if cfg!(debug_assertions) { - let fmt_layer = fmt::layer().pretty(); + let fmt_layer = fmt::layer().pretty().with_writer(std::io::stderr); (Some(fmt_layer), None, None) } else { // Creates a layer that @@ -93,6 +93,7 @@ pub fn create_tracing_subscriber() { // - does not print spans/targets // - only prints time, not date let fmt_layer = fmt::layer() + .with_writer(std::io::stderr) .event_format(Formatter) .fmt_fields(debug_fn(format_fields)); From edad0d44930d306c5e6493db920ff97c7160e66c Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 30 Aug 2023 18:44:24 +0200 Subject: [PATCH 14/99] Improve file listing output Adds pretty printing for file size and always shows the bundle hash name --- crates/dtmt/src/cmd/bundle/list.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/crates/dtmt/src/cmd/bundle/list.rs b/crates/dtmt/src/cmd/bundle/list.rs index dd72ad2..558126b 100644 --- a/crates/dtmt/src/cmd/bundle/list.rs +++ b/crates/dtmt/src/cmd/bundle/list.rs @@ -36,6 +36,18 @@ enum OutputFormat { Text, } +fn format_byte_size(size: usize) -> String { + if size < 1024 { + format!("{} Bytes", size) + } else if size < 1024 * 1024 { + format!("{} kB", size / 1024) + } else if size < 1024 * 1024 * 1024 { + format!("{} MB", size / (1024 * 1024)) + } else { + format!("{} GB", size / (1024 * 1024 * 1024)) + } +} + #[tracing::instrument(skip(ctx))] async fn print_bundle_contents

(ctx: &sdk::Context, path: P, fmt: OutputFormat) -> Result<()> where @@ -50,7 +62,11 @@ where match fmt { OutputFormat::Text => { - println!("Bundle: {}", bundle.name().display()); + println!( + "Bundle: {} ({:016x})", + bundle.name().display(), + bundle.name() + ); for f in bundle.files().iter() { if f.variants().len() != 1 { @@ -63,9 +79,10 @@ where let v = &f.variants()[0]; println!( - "\t{}.{}: {} bytes", + "\t{}.{}: {} ({})", f.base_name().display(), f.file_type().ext_name(), + format_byte_size(v.size()), v.size() ); } From 08219f05ba81b16bd34afa82ef37f99d32d65e3b Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Thu, 31 Aug 2023 17:14:54 +0200 Subject: [PATCH 15/99] sdk: Fix reading strings Fatshark has a few weird string fields, where they provide a length field, but then sometimes write a shorter, NUL-terminated string into that same field and adding padding up to the "advertised" length. To properly read those strings, we can't rely on just the length field anymore, but need to check for a NUL, too. --- lib/sdk/src/binary.rs | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/lib/sdk/src/binary.rs b/lib/sdk/src/binary.rs index 1fcc90e..9348e1b 100644 --- a/lib/sdk/src/binary.rs +++ b/lib/sdk/src/binary.rs @@ -43,6 +43,7 @@ impl FromBinary for Vec { } pub mod sync { + use std::ffi::CStr; use std::io::{self, Read, Seek, SeekFrom}; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; @@ -165,25 +166,13 @@ pub mod sync { } fn read_string_len(&mut self, len: usize) -> Result { - let mut buf = vec![0; len]; - let res = self - .read_exact(&mut buf) - .map_err(Report::new) - .and_then(|_| { - String::from_utf8(buf).map_err(|err| { - let ascii = String::from_utf8_lossy(err.as_bytes()).to_string(); - let bytes = format!("{:?}", err.as_bytes()); - Report::new(err) - .with_section(move || bytes.header("Bytes:")) - .with_section(move || ascii.header("ASCII:")) - }) - }); + let pos = self.stream_position(); + let res = read_string_len(self, len); if res.is_ok() { return res; } - let pos = self.stream_position(); if pos.is_ok() { res.with_section(|| { format!("{pos:#X} ({pos})", pos = pos.unwrap()).header("Position: ") @@ -243,4 +232,22 @@ pub mod sync { Err(err).with_section(|| format!("{pos:#X} ({pos})").header("Position: ")) } + + fn read_string_len(mut r: impl Read, len: usize) -> Result { + let mut buf = vec![0; len]; + r.read_exact(&mut buf) + .wrap_err_with(|| format!("Failed to read {} bytes", len))?; + + let res = match CStr::from_bytes_until_nul(&buf) { + Ok(s) => { + let s = s.to_str()?; + Ok(s.to_string()) + } + Err(_) => String::from_utf8(buf.clone()).map_err(Report::new), + }; + + res.wrap_err("Invalid binary for UTF8 string") + .with_section(|| format!("{}", String::from_utf8_lossy(&buf)).header("ASCI:")) + .with_section(|| format!("{:x?}", buf).header("Bytes:")) + } } From c997489e18de825300a9660f48973ff932663ddc Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 22 Sep 2023 15:35:39 +0200 Subject: [PATCH 16/99] Add some doc comments --- crates/dtmt/src/cmd/build.rs | 7 +++++++ lib/sdk/src/filetype/package.rs | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/crates/dtmt/src/cmd/build.rs b/crates/dtmt/src/cmd/build.rs index fab072b..74a627d 100644 --- a/crates/dtmt/src/cmd/build.rs +++ b/crates/dtmt/src/cmd/build.rs @@ -55,6 +55,7 @@ pub(crate) fn command_definition() -> Command { ) } +/// Try to find a `dtmt.cfg` in the given directory or traverse up the parents. #[tracing::instrument] async fn find_project_config(dir: Option) -> Result { let (path, mut file) = if let Some(path) = dir { @@ -102,6 +103,8 @@ async fn find_project_config(dir: Option) -> Result { Ok(cfg) } +/// Iterate over the paths in the given `Package` and +/// compile each file by its file type. #[tracing::instrument(skip_all)] async fn compile_package_files(pkg: &Package, cfg: &ModConfig) -> Result> { let root = Arc::new(&cfg.dir); @@ -148,6 +151,8 @@ async fn compile_package_files(pkg: &Package, cfg: &ModConfig) -> Result>(path: P) -> Result { let path = path.as_ref(); diff --git a/lib/sdk/src/filetype/package.rs b/lib/sdk/src/filetype/package.rs index 6394e42..758f79f 100644 --- a/lib/sdk/src/filetype/package.rs +++ b/lib/sdk/src/filetype/package.rs @@ -14,6 +14,15 @@ use crate::bundle::file::UserFile; use crate::bundle::filetype::BundleFileType; use crate::murmur::{HashGroup, IdString64, Murmur64}; +/// Resolves a relative path that might contain wildcards into a list of +/// paths that exist on disk and match that wildcard. +/// This is similar to globbing in Unix shells, but with much less features. +/// +/// The only wilcard character allowed is `*`, and only at the end of the string, +/// where it matches all files recursively in that directory. +/// +/// `t` is an optional extension name, that may be used to force a wildcard +/// path to only match that file type `t`. #[tracing::instrument] #[async_recursion] async fn resolve_wildcard( From f1f9a818cc4dc006f2d8e8512564b4322d8ef1da Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 22 Sep 2023 15:37:37 +0200 Subject: [PATCH 17/99] sdk: Allow any byte stream for hashing dictionary entries --- lib/sdk/src/murmur/dictionary.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sdk/src/murmur/dictionary.rs b/lib/sdk/src/murmur/dictionary.rs index 2d51af1..267f0a4 100644 --- a/lib/sdk/src/murmur/dictionary.rs +++ b/lib/sdk/src/murmur/dictionary.rs @@ -147,14 +147,14 @@ impl Dictionary { Ok(()) } - pub fn add(&mut self, value: String, group: HashGroup) { - let long = Murmur64::from(murmurhash64::hash(value.as_bytes(), SEED as u64)); - let short = Murmur32::from(murmurhash64::hash32(value.as_bytes(), SEED)); + pub fn add(&mut self, value: impl AsRef<[u8]>, group: HashGroup) { + let long = Murmur64::from(murmurhash64::hash(value.as_ref(), SEED as u64)); + let short = Murmur32::from(murmurhash64::hash32(value.as_ref(), SEED)); let entry = Entry { long, short, - value, + value: String::from_utf8_lossy(value.as_ref()).to_string(), group, }; From 3a6e954f9a45ac14df3ccb797ac86a797fb22ba4 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 19 Jul 2024 11:30:09 +0200 Subject: [PATCH 18/99] sdk: Refactor murmur modules and add IdString32 --- lib/sdk/src/murmur/idstring32.rs | 162 ++++++++++++++++++++++++++++ lib/sdk/src/murmur/idstring64.rs | 175 +++++++++++++++++++++++++++++++ lib/sdk/src/murmur/mod.rs | 4 + lib/sdk/src/murmur/types.rs | 173 ++---------------------------- 4 files changed, 347 insertions(+), 167 deletions(-) create mode 100644 lib/sdk/src/murmur/idstring32.rs create mode 100644 lib/sdk/src/murmur/idstring64.rs diff --git a/lib/sdk/src/murmur/idstring32.rs b/lib/sdk/src/murmur/idstring32.rs new file mode 100644 index 0000000..99ea7aa --- /dev/null +++ b/lib/sdk/src/murmur/idstring32.rs @@ -0,0 +1,162 @@ +use std::fmt; + +use serde::{Deserializer, Serializer}; + +use super::Murmur32; + +// This type encodes the fact that when reading in a bundle, we don't always have a dictionary +// entry for every hash in there. So we do want to have the real string available when needed, +// but at the same time retain the original hash information for when we don't. +// This is especially important when wanting to write back the read bundle, as the hashes need to +// stay the same. +// The previous system of always turning hashes into strings worked well for the purpose of +// displaying hashes, but would have made it very hard to turn a stringyfied hash back into +// an actual hash. +#[derive(Clone, Debug, Eq)] +pub enum IdString32 { + Hash(Murmur32), + String(String), +} + +impl IdString32 { + pub fn to_murmur32(&self) -> Murmur32 { + match self { + Self::Hash(hash) => *hash, + Self::String(s) => Murmur32::hash(s.as_bytes()), + } + } + + pub fn display(&self) -> IdString32Display { + let s = match self { + IdString32::Hash(hash) => hash.to_string(), + IdString32::String(s) => s.clone(), + }; + + IdString32Display(s) + } + + pub fn is_string(&self) -> bool { + match self { + IdString32::Hash(_) => false, + IdString32::String(_) => true, + } + } + + pub fn is_hash(&self) -> bool { + match self { + IdString32::Hash(_) => true, + IdString32::String(_) => false, + } + } +} + +impl From for IdString32 { + fn from(value: String) -> Self { + Self::String(value) + } +} + +impl From for IdString32 { + fn from(value: u32) -> Self { + Self::Hash(value.into()) + } +} + +impl From for u32 { + fn from(value: IdString32) -> Self { + value.to_murmur32().into() + } +} + +impl From for IdString32 { + fn from(value: Murmur32) -> Self { + Self::Hash(value) + } +} + +impl From for Murmur32 { + fn from(value: IdString32) -> Self { + value.to_murmur32() + } +} + +impl PartialEq for IdString32 { + fn eq(&self, other: &Self) -> bool { + self.to_murmur32() == other.to_murmur32() + } +} + +impl std::hash::Hash for IdString32 { + fn hash(&self, state: &mut H) { + state.write_u32(self.to_murmur32().into()); + } +} + +impl serde::Serialize for IdString32 { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_u32(self.to_murmur32().into()) + } +} + +struct IdString32Visitor; + +impl<'de> serde::de::Visitor<'de> for IdString32Visitor { + type Value = IdString32; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("an u32 or a string") + } + + fn visit_u32(self, value: u32) -> Result + where + E: serde::de::Error, + { + Ok(IdString32::Hash(value.into())) + } + + fn visit_str(self, v: &str) -> Result + where + E: serde::de::Error, + { + Ok(IdString32::String(v.to_string())) + } + + fn visit_string(self, v: String) -> Result + where + E: serde::de::Error, + { + Ok(IdString32::String(v)) + } +} + +impl<'de> serde::Deserialize<'de> for IdString32 { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_u32(IdString32Visitor) + } +} + +pub struct IdString32Display(String); + +impl std::fmt::Display for IdString32Display { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) + } +} + +impl std::fmt::UpperHex for IdString32 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + std::fmt::UpperHex::fmt(&self.to_murmur32(), f) + } +} + +impl std::fmt::LowerHex for IdString32 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + std::fmt::LowerHex::fmt(&self.to_murmur32(), f) + } +} diff --git a/lib/sdk/src/murmur/idstring64.rs b/lib/sdk/src/murmur/idstring64.rs new file mode 100644 index 0000000..781a0cd --- /dev/null +++ b/lib/sdk/src/murmur/idstring64.rs @@ -0,0 +1,175 @@ +use std::{fmt, path::Path}; + +use path_slash::PathExt as _; +use serde::{Deserializer, Serializer}; + +use super::Murmur64; + +// This type encodes the fact that when reading in a bundle, we don't always have a dictionary +// entry for every hash in there. So we do want to have the real string available when needed, +// but at the same time retain the original hash information for when we don't. +// This is especially important when wanting to write back the read bundle, as the hashes need to +// stay the same. +// The previous system of always turning hashes into strings worked well for the purpose of +// displaying hashes, but would have made it very hard to turn a stringyfied hash back into +// an actual hash. +#[derive(Clone, Debug, Eq)] +pub enum IdString64 { + Hash(Murmur64), + String(String), +} + +impl IdString64 { + pub fn to_murmur64(&self) -> Murmur64 { + match self { + Self::Hash(hash) => *hash, + Self::String(s) => Murmur64::hash(s.as_bytes()), + } + } + + pub fn display(&self) -> IdString64Display { + let s = match self { + IdString64::Hash(hash) => hash.to_string(), + IdString64::String(s) => s.clone(), + }; + + IdString64Display(s) + } + + pub fn is_string(&self) -> bool { + match self { + IdString64::Hash(_) => false, + IdString64::String(_) => true, + } + } + + pub fn is_hash(&self) -> bool { + match self { + IdString64::Hash(_) => true, + IdString64::String(_) => false, + } + } + + // Would love to have this as a proper `impl From`, but + // rustc will complain that it overlaps with the `impl From>`. + pub fn from_path(p: impl AsRef) -> Self { + Self::String(p.as_ref().to_slash_lossy().to_string()) + } +} + +impl From for IdString64 { + fn from(value: String) -> Self { + Self::String(value) + } +} + +impl From for IdString64 { + fn from(value: u64) -> Self { + Self::Hash(value.into()) + } +} + +impl From for IdString64 { + fn from(value: Murmur64) -> Self { + Self::Hash(value) + } +} + +impl From for Murmur64 { + fn from(value: IdString64) -> Self { + value.to_murmur64() + } +} + +impl From for u64 { + fn from(value: IdString64) -> Self { + value.to_murmur64().into() + } +} + +impl Default for IdString64 { + fn default() -> Self { + Self::Hash(0.into()) + } +} + +impl PartialEq for IdString64 { + fn eq(&self, other: &Self) -> bool { + self.to_murmur64() == other.to_murmur64() + } +} + +impl std::hash::Hash for IdString64 { + fn hash(&self, state: &mut H) { + state.write_u64(self.to_murmur64().into()); + } +} + +impl serde::Serialize for IdString64 { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_u64(self.to_murmur64().into()) + } +} + +struct IdString64Visitor; + +impl<'de> serde::de::Visitor<'de> for IdString64Visitor { + type Value = IdString64; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("an u64 or a string") + } + + fn visit_u64(self, value: u64) -> Result + where + E: serde::de::Error, + { + Ok(IdString64::Hash(value.into())) + } + + fn visit_str(self, v: &str) -> Result + where + E: serde::de::Error, + { + Ok(IdString64::String(v.to_string())) + } + + fn visit_string(self, v: String) -> Result + where + E: serde::de::Error, + { + Ok(IdString64::String(v)) + } +} + +impl<'de> serde::Deserialize<'de> for IdString64 { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_u64(IdString64Visitor) + } +} + +pub struct IdString64Display(String); + +impl std::fmt::Display for IdString64Display { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) + } +} + +impl std::fmt::UpperHex for IdString64 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + std::fmt::UpperHex::fmt(&self.to_murmur64(), f) + } +} + +impl std::fmt::LowerHex for IdString64 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + std::fmt::LowerHex::fmt(&self.to_murmur64(), f) + } +} diff --git a/lib/sdk/src/murmur/mod.rs b/lib/sdk/src/murmur/mod.rs index 87a8473..6449d38 100644 --- a/lib/sdk/src/murmur/mod.rs +++ b/lib/sdk/src/murmur/mod.rs @@ -8,6 +8,8 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; mod dictionary; // Currently unused // mod murmurhash32; +mod idstring32; +mod idstring64; mod murmurhash64; mod types; mod util; @@ -15,6 +17,8 @@ mod util; pub const SEED: u32 = 0; pub use dictionary::{Dictionary, Entry, HashGroup}; +pub use idstring32::*; +pub use idstring64::*; pub use murmurhash64::hash; pub use murmurhash64::hash32; pub use murmurhash64::hash_inverse as inverse; diff --git a/lib/sdk/src/murmur/types.rs b/lib/sdk/src/murmur/types.rs index 20bf46a..c66e2cf 100644 --- a/lib/sdk/src/murmur/types.rs +++ b/lib/sdk/src/murmur/types.rs @@ -1,7 +1,3 @@ -use std::path::Path; - -use path_slash::PathExt; - use self::util::{parse_hex32, parse_hex64}; use super::*; @@ -154,6 +150,12 @@ impl fmt::UpperHex for Murmur32 { } } +impl fmt::LowerHex for Murmur32 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::LowerHex::fmt(&self.0, f) + } +} + impl fmt::Display for Murmur32 { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{:08X}", self) @@ -222,166 +224,3 @@ impl<'de> Deserialize<'de> for Murmur32 { deserializer.deserialize_any(Self(0)) } } - -// This type encodes the fact that when reading in a bundle, we don't always have a dictionary -// entry for every hash in there. So we do want to have the real string available when needed, -// but at the same time retain the original hash information for when we don't. -// This is especially important when wanting to write back the read bundle, as the hashes need to -// stay the same. -// The previous system of always turning hashes into strings worked well for the purpose of -// displaying hashes, but would have made it very hard to turn a stringyfied hash back into -// an actual hash. -#[derive(Clone, Debug, Eq)] -pub enum IdString64 { - Hash(Murmur64), - String(String), -} - -impl IdString64 { - pub fn to_murmur64(&self) -> Murmur64 { - match self { - Self::Hash(hash) => *hash, - Self::String(s) => Murmur64::hash(s.as_bytes()), - } - } - - pub fn display(&self) -> IdString64Display { - let s = match self { - IdString64::Hash(hash) => hash.to_string(), - IdString64::String(s) => s.clone(), - }; - - IdString64Display(s) - } - - pub fn is_string(&self) -> bool { - match self { - IdString64::Hash(_) => false, - IdString64::String(_) => true, - } - } - - pub fn is_hash(&self) -> bool { - match self { - IdString64::Hash(_) => true, - IdString64::String(_) => false, - } - } - - // Would love to have this as a proper `impl From`, but - // rustc will complain that it overlaps with the `impl From>`. - pub fn from_path(p: impl AsRef) -> Self { - Self::String(p.as_ref().to_slash_lossy().to_string()) - } -} - -impl From for IdString64 { - fn from(value: String) -> Self { - Self::String(value) - } -} - -impl From for IdString64 { - fn from(value: u64) -> Self { - Self::Hash(value.into()) - } -} - -impl From for IdString64 { - fn from(value: Murmur64) -> Self { - Self::Hash(value) - } -} - -impl From for Murmur64 { - fn from(value: IdString64) -> Self { - value.to_murmur64() - } -} - -impl Default for IdString64 { - fn default() -> Self { - Self::Hash(0.into()) - } -} - -impl PartialEq for IdString64 { - fn eq(&self, other: &Self) -> bool { - self.to_murmur64() == other.to_murmur64() - } -} - -impl std::hash::Hash for IdString64 { - fn hash(&self, state: &mut H) { - state.write_u64(self.to_murmur64().into()); - } -} - -impl serde::Serialize for IdString64 { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - serializer.serialize_u64(self.to_murmur64().into()) - } -} - -struct IdString64Visitor; - -impl<'de> serde::de::Visitor<'de> for IdString64Visitor { - type Value = IdString64; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("an u64 or a string") - } - - fn visit_u64(self, value: u64) -> Result - where - E: serde::de::Error, - { - Ok(IdString64::Hash(value.into())) - } - - fn visit_str(self, v: &str) -> Result - where - E: serde::de::Error, - { - Ok(IdString64::String(v.to_string())) - } - - fn visit_string(self, v: String) -> Result - where - E: serde::de::Error, - { - Ok(IdString64::String(v)) - } -} - -impl<'de> serde::Deserialize<'de> for IdString64 { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - deserializer.deserialize_u64(IdString64Visitor) - } -} - -pub struct IdString64Display(String); - -impl std::fmt::Display for IdString64Display { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.0) - } -} - -impl std::fmt::UpperHex for IdString64 { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - std::fmt::UpperHex::fmt(&self.to_murmur64(), f) - } -} - -impl std::fmt::LowerHex for IdString64 { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - std::fmt::LowerHex::fmt(&self.to_murmur64(), f) - } -} From dbf060032b015a9211f475339b8fbfcae234c3d4 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sun, 28 Jul 2024 14:46:10 +0200 Subject: [PATCH 19/99] sdk: Implement bundle database resource hashes Algorithm reverse engineered by WhiteGoat. --- lib/sdk/src/bundle/database.rs | 41 +++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/lib/sdk/src/bundle/database.rs b/lib/sdk/src/bundle/database.rs index fce26ee..d9e0f03 100644 --- a/lib/sdk/src/bundle/database.rs +++ b/lib/sdk/src/bundle/database.rs @@ -36,6 +36,25 @@ pub struct BundleDatabase { bundle_contents: HashMap>, } +// Implements the partial Murmur that's used by the engine to compute bundle resource hashes, +// but in a way that the loop can be done outside the function. +#[inline(always)] +fn add_to_resource_hash(mut k: u64, name: impl Into) -> u64 { + const M: u64 = 0xc6a4a7935bd1e995; + const R: u64 = 47; + + let mut h: u64 = name.into(); + + k = k.wrapping_mul(M); + k ^= k >> R; + k = k.wrapping_mul(M); + + h ^= k; + k = M.wrapping_mul(h); + + k +} + impl BundleDatabase { pub fn add_bundle(&mut self, bundle: &Bundle) { let hash = bundle.name().to_murmur64(); @@ -69,20 +88,26 @@ impl BundleDatabase { } } + let mut resource_hash = 0; + for f in bundle.files() { + let name = f.base_name().to_murmur64(); let file_name = FileName { extension: f.file_type(), - name: f.base_name().to_murmur64(), + name, }; - // TODO: Compute actual resource hash - self.resource_hashes.insert(hash, 0); + resource_hash = add_to_resource_hash(resource_hash, name); + // TODO: Make sure each file name only exists once. Probably best to turn + // the `Vec` into a sorted `HashSet`. self.bundle_contents .entry(hash) .or_default() .push(file_name); } + + self.resource_hashes.insert(hash, resource_hash); } } @@ -103,7 +128,7 @@ impl FromBinary for BundleDatabase { let mut stored_files = HashMap::with_capacity(num_entries); for _ in 0..num_entries { - let hash = Murmur64::from(r.read_u64()?); + let hash = r.read_u64().map(Murmur64::from)?; let num_files = r.read_u32()? as usize; let mut files = Vec::with_capacity(num_files); @@ -161,7 +186,7 @@ impl FromBinary for BundleDatabase { let mut resource_hashes = HashMap::with_capacity(num_hashes); for _ in 0..num_hashes { - let name = Murmur64::from(r.read_u64()?); + let name = r.read_u64().map(Murmur64::from)?; let hash = r.read_u64()?; resource_hashes.insert(name, hash); @@ -171,14 +196,14 @@ impl FromBinary for BundleDatabase { let mut bundle_contents = HashMap::with_capacity(num_contents); for _ in 0..num_contents { - let hash = Murmur64::from(r.read_u64()?); + let hash = r.read_u64().map(Murmur64::from)?; let num_files = r.read_u32()? as usize; let mut files = Vec::with_capacity(num_files); for _ in 0..num_files { - let extension = BundleFileType::from(r.read_u64()?); - let name = Murmur64::from(r.read_u64()?); + let extension = r.read_u64().map(BundleFileType::from)?; + let name = r.read_u64().map(Murmur64::from)?; files.push(FileName { extension, name }); } From 7fa08c2efd10ae87f9bcf588d508bf1631eea845 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sun, 28 Jul 2024 17:55:10 +0200 Subject: [PATCH 20/99] dtmt: Implement listing bundle database contents --- CHANGELOG.adoc | 1 + crates/dtmt/src/cmd/bundle/db.rs | 129 ++++++++++++++++++++++++++++++ crates/dtmt/src/cmd/bundle/mod.rs | 3 + lib/sdk/src/bundle/database.rs | 20 +++-- 4 files changed, 147 insertions(+), 6 deletions(-) create mode 100644 crates/dtmt/src/cmd/bundle/db.rs diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index db30865..c5ba065 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -20,6 +20,7 @@ - dtmm: fetch file version for Nexus mods - dtmm: handle `nxm://` URIs via IPC and import the corresponding mod - dtmm: Add button to open mod on nexusmods.com +- dtmt: Implement commands to list bundles and contents === Fixed diff --git a/crates/dtmt/src/cmd/bundle/db.rs b/crates/dtmt/src/cmd/bundle/db.rs new file mode 100644 index 0000000..6d4da59 --- /dev/null +++ b/crates/dtmt/src/cmd/bundle/db.rs @@ -0,0 +1,129 @@ +use std::{io::Cursor, path::PathBuf}; + +use clap::{value_parser, Arg, ArgMatches, Command}; +use color_eyre::{eyre::Context as _, Result}; +use sdk::murmur::{HashGroup, IdString64, Murmur64}; +use sdk::{BundleDatabase, FromBinary as _}; +use tokio::fs; + +pub(crate) fn command_definition() -> Command { + Command::new("db") + .about("Various operations regarding `bundle_database.data`.") + .subcommand_required(true) + .subcommand( + Command::new("list-files") + .about("List bundle contents") + .arg( + Arg::new("database") + .required(true) + .help("Path to the bundle database") + .value_parser(value_parser!(PathBuf)), + ) + .arg( + Arg::new("bundle") + .help("The bundle name. If omitted, all bundles will be listed.") + .required(false), + ), + ) + .subcommand( + Command::new("list-bundles").about("List bundles").arg( + Arg::new("database") + .required(true) + .help("Path to the bundle database") + .value_parser(value_parser!(PathBuf)), + ), + ) +} + +#[tracing::instrument(skip_all)] +pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { + let Some((op, sub_matches)) = matches.subcommand() else { + unreachable!("clap is configured to require a subcommand"); + }; + + let database = { + let path = sub_matches + .get_one::("database") + .expect("argument is required"); + + let binary = fs::read(&path) + .await + .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; + + let mut r = Cursor::new(binary); + + BundleDatabase::from_binary(&mut r).wrap_err("Failed to parse bundle database")? + }; + + match op { + "list-files" => { + let index = database.files(); + + if let Some(bundle) = sub_matches.get_one::("bundle") { + let hash = u64::from_str_radix(bundle, 16) + .map(Murmur64::from) + .wrap_err("Invalid hex sequence")?; + + if let Some(files) = index.get(&hash) { + for file in files { + let name = ctx.lookup_hash(file.name, HashGroup::Filename); + let extension = file.extension.ext_name(); + println!("{}.{}", name.display(), extension); + } + } else { + tracing::info!("Bundle {} not found in the database", bundle); + } + } else { + for (bundle_hash, files) in index.iter() { + let bundle_name = ctx.lookup_hash(*bundle_hash, HashGroup::Filename); + + match bundle_name { + IdString64::String(name) => { + println!("{:016X} {}", bundle_hash, name); + } + IdString64::Hash(hash) => { + println!("{:016X}", hash); + } + } + + for file in files { + let name = ctx.lookup_hash(file.name, HashGroup::Filename); + let extension = file.extension.ext_name(); + + match name { + IdString64::String(name) => { + println!("\t{:016X}.{:<12} {}", file.name, extension, name); + } + IdString64::Hash(hash) => { + println!("\t{:016X}.{}", hash, extension); + } + } + } + + println!(); + } + } + + Ok(()) + } + "list-bundles" => { + for bundle_hash in database.bundles().keys() { + let bundle_name = ctx.lookup_hash(*bundle_hash, HashGroup::Filename); + + match bundle_name { + IdString64::String(name) => { + println!("{:016X} {}", bundle_hash, name); + } + IdString64::Hash(hash) => { + println!("{:016X}", hash); + } + } + } + + Ok(()) + } + _ => unreachable!( + "clap is configured to require a subcommand, and they're all handled above" + ), + } +} diff --git a/crates/dtmt/src/cmd/bundle/mod.rs b/crates/dtmt/src/cmd/bundle/mod.rs index 0e7c9f7..c5145e4 100644 --- a/crates/dtmt/src/cmd/bundle/mod.rs +++ b/crates/dtmt/src/cmd/bundle/mod.rs @@ -1,6 +1,7 @@ use clap::{ArgMatches, Command}; use color_eyre::eyre::Result; +mod db; mod decompress; mod extract; mod inject; @@ -14,6 +15,7 @@ pub(crate) fn command_definition() -> Command { .subcommand(extract::command_definition()) .subcommand(inject::command_definition()) .subcommand(list::command_definition()) + .subcommand(db::command_definition()) } #[tracing::instrument(skip_all)] @@ -23,6 +25,7 @@ pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { Some(("extract", sub_matches)) => extract::run(ctx, sub_matches).await, Some(("inject", sub_matches)) => inject::run(ctx, sub_matches).await, Some(("list", sub_matches)) => list::run(ctx, sub_matches).await, + Some(("db", sub_matches)) => db::run(ctx, sub_matches).await, _ => unreachable!( "clap is configured to require a subcommand, and they're all handled above" ), diff --git a/lib/sdk/src/bundle/database.rs b/lib/sdk/src/bundle/database.rs index d9e0f03..185c62f 100644 --- a/lib/sdk/src/bundle/database.rs +++ b/lib/sdk/src/bundle/database.rs @@ -19,15 +19,15 @@ const DATABASE_VERSION: u32 = 0x6; const FILE_VERSION: u32 = 0x4; pub struct BundleFile { - name: String, - stream: String, - platform_specific: bool, - file_time: u64, + pub name: String, + pub stream: String, + pub platform_specific: bool, + pub file_time: u64, } pub struct FileName { - extension: BundleFileType, - name: Murmur64, + pub extension: BundleFileType, + pub name: Murmur64, } pub struct BundleDatabase { @@ -56,6 +56,14 @@ fn add_to_resource_hash(mut k: u64, name: impl Into) -> u64 { } impl BundleDatabase { + pub fn bundles(&self) -> &HashMap> { + &self.stored_files + } + + pub fn files(&self) -> &HashMap> { + &self.bundle_contents + } + pub fn add_bundle(&mut self, bundle: &Bundle) { let hash = bundle.name().to_murmur64(); let name = hash.to_string(); From d931e6b9cada6fdce92595a27a96b7e7428f7356 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sun, 28 Jul 2024 22:02:01 +0200 Subject: [PATCH 21/99] dtmt: Add command to search for files Not really of much use at the moment, but inspired by the HD2 community. --- CHANGELOG.adoc | 1 + crates/dtmt/src/cmd/bundle/db.rs | 57 ++++++++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index c5ba065..1bfb0dd 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -21,6 +21,7 @@ - dtmm: handle `nxm://` URIs via IPC and import the corresponding mod - dtmm: Add button to open mod on nexusmods.com - dtmt: Implement commands to list bundles and contents +- dtmt: Implement command to search for files === Fixed diff --git a/crates/dtmt/src/cmd/bundle/db.rs b/crates/dtmt/src/cmd/bundle/db.rs index 6d4da59..b537991 100644 --- a/crates/dtmt/src/cmd/bundle/db.rs +++ b/crates/dtmt/src/cmd/bundle/db.rs @@ -33,6 +33,21 @@ pub(crate) fn command_definition() -> Command { .value_parser(value_parser!(PathBuf)), ), ) + .subcommand( + Command::new("find-file") + .about("Find the bundle a file belongs to") + .arg( + Arg::new("database") + .required(true) + .help("Path to the bundle database") + .value_parser(value_parser!(PathBuf)), + ) + .arg( + Arg::new("file-name") + .required(true) + .help("Name of the file. May be a hash in hex representation or a string"), + ), + ) } #[tracing::instrument(skip_all)] @@ -79,10 +94,10 @@ pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { match bundle_name { IdString64::String(name) => { - println!("{:016X} {}", bundle_hash, name); + println!("{:016x} {}", bundle_hash, name); } IdString64::Hash(hash) => { - println!("{:016X}", hash); + println!("{:016x}", hash); } } @@ -92,10 +107,10 @@ pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { match name { IdString64::String(name) => { - println!("\t{:016X}.{:<12} {}", file.name, extension, name); + println!("\t{:016x}.{:<12} {}", file.name, extension, name); } IdString64::Hash(hash) => { - println!("\t{:016X}.{}", hash, extension); + println!("\t{:016x}.{}", hash, extension); } } } @@ -112,16 +127,46 @@ pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { match bundle_name { IdString64::String(name) => { - println!("{:016X} {}", bundle_hash, name); + println!("{:016x} {}", bundle_hash, name); } IdString64::Hash(hash) => { - println!("{:016X}", hash); + println!("{:016x}", hash); } } } Ok(()) } + "find-file" => { + let name = sub_matches + .get_one::("file-name") + .expect("required argument"); + let name = match u64::from_str_radix(name, 16).map(Murmur64::from) { + Ok(hash) => hash, + Err(_) => Murmur64::hash(name), + }; + + let bundles = database.files().iter().filter_map(|(bundle_hash, files)| { + if files.iter().any(|file| file.name == name) { + Some(bundle_hash) + } else { + None + } + }); + + let mut found = false; + + for bundle in bundles { + found = true; + println!("{:016x}", bundle); + } + + if !found { + std::process::exit(1); + } + + Ok(()) + } _ => unreachable!( "clap is configured to require a subcommand, and they're all handled above" ), From 2a1d8d815f3af3cde183183636f55698b8cc5ee2 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 14 Aug 2024 09:22:24 +0200 Subject: [PATCH 22/99] Add tests for hash inversion Just a quick round trip test, and an additional assert to demonstrate that byte order does matter. --- lib/sdk/src/murmur/murmurhash64.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/sdk/src/murmur/murmurhash64.rs b/lib/sdk/src/murmur/murmurhash64.rs index f15248c..ca69852 100644 --- a/lib/sdk/src/murmur/murmurhash64.rs +++ b/lib/sdk/src/murmur/murmurhash64.rs @@ -119,4 +119,9 @@ fn test_hash() { } #[test] -fn test_inverse() {} +fn test_inverse() { + let h = hash("lua".as_bytes(), crate::murmur::SEED as u64); + let inv = hash_inverse(h, crate::murmur::SEED as u64); + assert_eq!(h, hash(&inv.to_le_bytes(), crate::murmur::SEED as u64)); + assert_ne!(h, hash(&inv.to_be_bytes(), crate::murmur::SEED as u64)); +} From e3362400943a318db323cf46a8fe9981e8501b99 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 20 Aug 2024 16:28:08 +0200 Subject: [PATCH 23/99] Consilidate template libraries Remove last uses of `string_template` in favor of `minijinja`. Closes #124. --- Cargo.lock | 11 +------- Cargo.toml | 1 + crates/dtmm/Cargo.toml | 2 +- crates/dtmt/Cargo.toml | 2 +- crates/dtmt/src/cmd/new.rs | 54 ++++++++++++++++++++++---------------- 5 files changed, 36 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a251de9..ce13303 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -937,6 +937,7 @@ dependencies = [ "futures-util", "glob", "luajit2-sys", + "minijinja", "nanorand", "notify", "oodle", @@ -948,7 +949,6 @@ dependencies = [ "serde", "serde_sjson", "shlex", - "string_template", "tempfile", "tokio", "tokio-stream", @@ -3307,15 +3307,6 @@ dependencies = [ "float-cmp", ] -[[package]] -name = "string_template" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f2c6b2c3fa950895c9aeb0c3cb9271d7eb580662af9af2b711b593f446320" -dependencies = [ - "regex", -] - [[package]] name = "strip-ansi-escapes" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index f38ac22..62d1fd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ exclude = ["lib/color-eyre"] [workspace.dependencies] zip = { version = "2.1.3", default-features = false, features = ["deflate", "bzip2", "zstd", "time"] } +minijinja = { version = "2.0.1", default-features = false } [patch.crates-io] color-eyre = { path = "lib/color-eyre" } diff --git a/crates/dtmm/Cargo.toml b/crates/dtmm/Cargo.toml index f947fc6..b7bee49 100644 --- a/crates/dtmm/Cargo.toml +++ b/crates/dtmm/Cargo.toml @@ -27,7 +27,7 @@ futures = "0.3.25" interprocess = "2.1.0" lazy_static = "1.4.0" luajit2-sys = { path = "../../lib/luajit2-sys", version = "*" } -minijinja = { version = "2.0.1", default-features = false } +minijinja = { workspace = true } nexusmods = { path = "../../lib/nexusmods", version = "*" } oodle = { path = "../../lib/oodle", version = "*" } open = "5.0.1" diff --git a/crates/dtmt/Cargo.toml b/crates/dtmt/Cargo.toml index d836a50..e2e3fb9 100644 --- a/crates/dtmt/Cargo.toml +++ b/crates/dtmt/Cargo.toml @@ -20,7 +20,7 @@ promptly = "0.3.1" sdk = { path = "../../lib/sdk", version = "*" } serde_sjson = { path = "../../lib/serde_sjson", version = "*" } serde = { version = "1.0.147", features = ["derive"] } -string_template = "0.2.1" +minijinja = { workspace = true } tokio-stream = { version = "0.1.11", features = ["fs", "io-util"] } tokio = { version = "1.21.2", features = ["rt-multi-thread", "fs", "process", "macros", "tracing", "io-util", "io-std"] } tracing-error = "0.2.0" diff --git a/crates/dtmt/src/cmd/new.rs b/crates/dtmt/src/cmd/new.rs index eb6a4f9..1993ea2 100644 --- a/crates/dtmt/src/cmd/new.rs +++ b/crates/dtmt/src/cmd/new.rs @@ -1,11 +1,10 @@ -use std::collections::HashMap; use std::path::PathBuf; use clap::{Arg, ArgMatches, Command}; use color_eyre::eyre::{self, Context, Result}; use color_eyre::Help; use futures::{StreamExt, TryStreamExt}; -use string_template::Template; +use minijinja::Environment; use tokio::fs::{self, DirBuilder}; const TEMPLATES: [(&str, &str); 5] = [ @@ -137,34 +136,45 @@ pub(crate) async fn run(_ctx: sdk::Context, matches: &ArgMatches) -> Result<()> tracing::debug!(root = %root.display(), name, id); - let mut data = HashMap::new(); - data.insert("name", name.as_str()); - data.insert("id", id.as_str()); + let render_ctx = minijinja::context!(name => name.as_str(), id => id.as_str()); + let env = Environment::new(); let templates = TEMPLATES .iter() .map(|(path_tmpl, content_tmpl)| { - let path = Template::new(path_tmpl).render(&data); - let content = Template::new(content_tmpl).render(&data); - - (root.join(path), content) + env.render_str(path_tmpl, &render_ctx) + .wrap_err_with(|| format!("Failed to render template: {}", path_tmpl)) + .and_then(|path| { + env.render_named_str(&path, content_tmpl, &render_ctx) + .wrap_err_with(|| format!("Failed to render template '{}'", &path)) + .map(|content| (root.join(path), content)) + }) }) - .map(|(path, content)| async move { - let dir = path - .parent() - .ok_or_else(|| eyre::eyre!("invalid root path"))?; + .map(|res| async move { + match res { + Ok((path, content)) => { + let dir = path + .parent() + .ok_or_else(|| eyre::eyre!("invalid root path"))?; - DirBuilder::new() - .recursive(true) - .create(&dir) - .await - .wrap_err_with(|| format!("Failed to create directory {}", dir.display()))?; + DirBuilder::new() + .recursive(true) + .create(&dir) + .await + .wrap_err_with(|| { + format!("Failed to create directory {}", dir.display()) + })?; - tracing::trace!("Writing file {}", path.display()); + tracing::trace!("Writing file {}", path.display()); - fs::write(&path, content.as_bytes()) - .await - .wrap_err_with(|| format!("Failed to write content to path {}", path.display())) + fs::write(&path, content.as_bytes()) + .await + .wrap_err_with(|| { + format!("Failed to write content to path {}", path.display()) + }) + } + Err(e) => Err(e), + } }); futures::stream::iter(templates) From df2992a4768e7c6f582049e45089141cd69ec7bd Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 20 Aug 2024 16:28:56 +0200 Subject: [PATCH 24/99] Improve mod template comments --- crates/dtmt/src/cmd/new.rs | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/crates/dtmt/src/cmd/new.rs b/crates/dtmt/src/cmd/new.rs index 1993ea2..571b0cb 100644 --- a/crates/dtmt/src/cmd/new.rs +++ b/crates/dtmt/src/cmd/new.rs @@ -10,8 +10,21 @@ use tokio::fs::{self, DirBuilder}; const TEMPLATES: [(&str, &str); 5] = [ ( "dtmt.cfg", - r#"id = "{{id}}" + r#"// +// This is your mod's main configuration file. It tells DTMT how to build the mod, +// and DTMM what to display to your users. +// Certain files have been pre-filled by the template, the ones commented out (`//`) +// are optional. +// +// A unique identifier (preferably lower case, alphanumeric) +id = "{{id}}" +// The display name that your users will see. +// This doesn't have to be unique, but you still want to avoid being confused with other +// mods. name = "{{name}}" +// It's good practice to increase this number whenever you publish changes. +// It's up to you if you use SemVer or something simpler like `1970-12-24`. It should sort and +// compare well, though. version = "0.1.0" // author = "" @@ -31,16 +44,25 @@ categories = [ // A list of mod IDs that this mod depends on. You can find // those IDs by downloading the mod and extracting their `dtmt.cfg`. +// To make your fellow modders' lives easier, publish your own mods' IDs +// somewhere visible, such as the Nexusmods page. depends = [ DMF ] +// The primary resources that serve as the entry point to your +// mod's code. Unless for very specific use cases, the generated +// values shouldn't be changed. resources = { init = "scripts/mods/{{id}}/init" data = "scripts/mods/{{id}}/data" localization = "scripts/mods/{{id}}/localization" } +// The list of packages, or bundles, to build. +// Each one corresponds to a package definition in the named folder. +// For mods that contain only code and/or a few small assets, a single +// package will suffice. packages = [ "packages/mods/{{id}}" ] @@ -58,7 +80,6 @@ packages = [ r#"local mod = get_mod("{{id}}") -- Your mod code goes here. --- https://vmf-docs.verminti.de "#, ), ( From a2bbab1398e6f2caecd14a10efc564d0ef95d7c4 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 21 Aug 2024 14:25:41 +0200 Subject: [PATCH 25/99] Update dependencies --- Cargo.lock | 870 +++++++++++++++++++++---------------- Cargo.toml | 49 ++- crates/dtmm/Cargo.toml | 60 +-- crates/dtmt/Cargo.toml | 54 +-- lib/color-eyre | 2 +- lib/dtmt-shared/Cargo.toml | 16 +- lib/luajit2-sys | 2 +- lib/oodle/Cargo.toml | 6 +- lib/oodle/src/lib.rs | 1 + lib/sdk/Cargo.toml | 40 +- 10 files changed, 639 insertions(+), 461 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce13303..26ccff7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aho-corasick" version = "1.1.3" @@ -29,7 +35,8 @@ dependencies = [ [[package]] name = "ansi-parser" version = "0.9.1" -source = "git+https://gitlab.com/lschwiderski/ansi-parser.git?branch=issue/outdated-heapless#bfcd2689677fa93ce72c55833e891af36c65b2aa" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43e7fd8284f025d0bd143c2855618ecdf697db55bde39211e5c9faec7669173" dependencies = [ "heapless", "nom", @@ -46,9 +53,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -61,33 +68,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -95,9 +102,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arbitrary" @@ -110,15 +117,15 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "associative-cache" @@ -134,7 +141,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -161,6 +168,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.3.0" @@ -169,15 +182,15 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -205,16 +218,14 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.4" +version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cexpr", "clang-sys", "itertools", - "lazy_static", - "lazycell", "log", "prettyplease", "proc-macro2", @@ -222,8 +233,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.63", - "which", + "syn 2.0.75", ] [[package]] @@ -234,9 +244,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitmaps" @@ -276,9 +286,9 @@ checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "bytemuck" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" +checksum = "6fd4c6dcc3b0aea2f5c0b4b82c2b15fe39ddbc76041a310848f4706edf76bb31" [[package]] name = "byteorder" @@ -288,9 +298,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -340,13 +350,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.97" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -376,9 +386,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -387,9 +397,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -397,9 +407,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -411,27 +421,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cli-table" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbb116d9e2c4be7011360d0c0bee565712c11e969c9609b25b619366dc379d" +checksum = "b53f9241f288a7b12c56565f04aaeaeeab6b8923d42d99255d4ca428b4d97f89" dependencies = [ "cli-table-derive", "termcolor", @@ -440,9 +450,9 @@ dependencies = [ [[package]] name = "cli-table-derive" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af3bfb9da627b0a6c467624fb7963921433774ed435493b5c08a3053e829ad4" +checksum = "3e83a93253aaae7c74eb7428ce4faa6e219ba94886908048888701819f82fb94" dependencies = [ "proc-macro2", "quote", @@ -530,9 +540,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colors-transform" @@ -549,7 +559,7 @@ dependencies = [ "directories", "serde", "thiserror", - "toml 0.8.13", + "toml 0.8.19", ] [[package]] @@ -574,9 +584,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-graphics" @@ -616,9 +626,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -649,9 +659,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -721,7 +731,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -793,15 +803,21 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + [[package]] name = "druid" version = "0.8.3" @@ -890,7 +906,7 @@ dependencies = [ "ansi-parser", "async-recursion", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "clap", "color-eyre", "colors-transform", @@ -986,9 +1002,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" @@ -1079,24 +1095,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1147,11 +1163,11 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fontconfig-parser" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" +checksum = "c1fcfcd44ca6e90c921fee9fa665d530b21ef1327a4c1a6c5250ea44b776ada7" dependencies = [ - "roxmltree 0.19.0", + "roxmltree 0.20.0", ] [[package]] @@ -1261,7 +1277,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -1386,9 +1402,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gio" @@ -1544,15 +1560,15 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", "indexmap", "slab", @@ -1604,15 +1620,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "1.1.0" @@ -1626,9 +1633,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -1636,12 +1643,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http", "http-body", "pin-project-lite", @@ -1649,15 +1656,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -1673,6 +1680,23 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-tls" version = "0.6.0" @@ -1691,9 +1715,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-channel", @@ -1756,9 +1780,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown", @@ -1786,9 +1810,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", "js-sys", @@ -1798,10 +1822,11 @@ dependencies = [ [[package]] name = "interprocess" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4d0250d41da118226e55b3d50ca3f0d9e0a0f6829b92f543ac0054aeea1572" +checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" dependencies = [ + "doctest-file", "libc", "recvmsg", "widestring", @@ -1854,15 +1879,15 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1875,9 +1900,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1890,9 +1915,9 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1969,30 +1994,24 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2001,15 +2020,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lockfree-object-pool" @@ -2019,9 +2039,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "luajit2-sys" @@ -2059,9 +2079,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2097,10 +2117,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "minijinja" -version = "2.0.1" +name = "minicov" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7165d0e94806d52ad5295e4b54a95176d831814840bc067298ca647e1c956338" +checksum = "5c71e683cd655513b99affab7d317deb690528255a0d5f717f1024093c12b169" +dependencies = [ + "cc", + "walkdir", +] + +[[package]] +name = "minijinja" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf369fce3289017a63e514dfca10a0a6f1a02216b21b588b79f6a1081eb999f5" dependencies = [ "serde", ] @@ -2113,14 +2143,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", "simd-adler32", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "0.8.11" @@ -2133,6 +2172,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mio" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi", + "libc", + "wasi", + "windows-sys 0.52.0", +] + [[package]] name = "nanorand" version = "0.7.0" @@ -2141,11 +2192,10 @@ checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -2223,7 +2273,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -2231,7 +2281,7 @@ dependencies = [ "kqueue", "libc", "log", - "mio", + "mio 0.8.11", "walkdir", "windows-sys 0.48.0", ] @@ -2261,16 +2311,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "num_threads" version = "0.1.7" @@ -2291,9 +2331,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2315,9 +2355,9 @@ dependencies = [ [[package]] name = "open" -version = "5.1.2" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449f0ff855d85ddbf1edd5b646d65249ead3f5e422aaa86b7d2d0b049b103e32" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ "is-wsl", "libc", @@ -2326,11 +2366,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -2347,7 +2387,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -2358,9 +2398,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -2465,9 +2505,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -2476,9 +2516,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -2486,22 +2526,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -2618,7 +2658,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -2649,7 +2689,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.4", ] [[package]] @@ -2675,7 +2715,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -2714,9 +2754,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2778,18 +2818,18 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -2798,14 +2838,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2819,13 +2859,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -2836,15 +2876,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", @@ -2856,6 +2896,7 @@ dependencies = [ "http-body", "http-body-util", "hyper", + "hyper-rustls", "hyper-tls", "hyper-util", "ipnet", @@ -2879,7 +2920,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.52.0", + "windows-registry", ] [[package]] @@ -2902,13 +2943,28 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.37" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" +checksum = "0f86ae463694029097b846d8f99fd5536740602ae00022c0c50c5600720b2f71" dependencies = [ "bytemuck", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "roxmltree" version = "0.15.1" @@ -2920,9 +2976,9 @@ dependencies = [ [[package]] name = "roxmltree" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rustc-demangle" @@ -2951,7 +3007,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2959,10 +3015,23 @@ dependencies = [ ] [[package]] -name = "rustls-pemfile" -version = "2.1.2" +name = "rustls" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64 0.22.1", "rustls-pki-types", @@ -2970,9 +3039,20 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + +[[package]] +name = "rustls-webpki" +version = "0.102.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] [[package]] name = "rustybuzz" @@ -3055,7 +3135,7 @@ name = "sdk" version = "0.3.0" dependencies = [ "async-recursion", - "bitflags 2.5.0", + "bitflags 2.6.0", "byteorder", "color-eyre", "csv-async", @@ -3078,11 +3158,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3091,9 +3171,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3122,31 +3202,32 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -3162,9 +3243,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -3272,6 +3353,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3289,7 +3376,7 @@ dependencies = [ "keyvalues-parser", "keyvalues-serde", "serde", - "winreg 0.51.0", + "winreg", ] [[package]] @@ -3322,6 +3409,12 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "svgfilters" version = "0.4.0" @@ -3354,9 +3447,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.63" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -3365,26 +3458,29 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -3399,26 +3495,27 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.8.13", + "toml 0.8.19", "version-compare", ] [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3432,22 +3529,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -3520,18 +3617,18 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", ] [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -3544,32 +3641,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", - "mio", - "num_cpus", + "mio 1.0.2", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -3582,6 +3678,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.15" @@ -3617,21 +3724,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.13" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.13", + "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -3649,15 +3756,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.8", + "winnow 0.6.18", ] [[package]] @@ -3673,20 +3780,19 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3694,7 +3800,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3708,7 +3813,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] @@ -3941,15 +4046,21 @@ checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -3991,9 +4102,9 @@ checksum = "14706d2a800ee8ff38c1d3edb873cd616971ea59eb7c0d046bb44ef59b06a1ae" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -4015,9 +4126,9 @@ checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vte" @@ -4031,9 +4142,9 @@ dependencies = [ [[package]] name = "vte_generate_state_changes" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff" +checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" dependencies = [ "proc-macro2", "quote", @@ -4066,34 +4177,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -4103,9 +4215,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4113,31 +4225,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-bindgen-test" -version = "0.3.42" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" +checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" dependencies = [ "console_error_panic_hook", "js-sys", + "minicov", "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", @@ -4146,20 +4259,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.42" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" +checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" dependencies = [ "proc-macro2", "quote", - "syn 2.0.63", + "syn 2.0.75", ] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -4171,18 +4284,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "widestring" version = "1.1.0" @@ -4207,11 +4308,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4220,6 +4321,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -4235,7 +4366,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -4255,18 +4395,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -4277,9 +4417,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -4289,9 +4429,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4301,15 +4441,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4319,9 +4459,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4331,9 +4471,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4343,9 +4483,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4355,9 +4495,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -4370,9 +4510,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -4387,16 +4527,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "winres" version = "0.1.12" @@ -4440,10 +4570,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] -name = "zip" -version = "2.1.3" +name = "zeroize" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775a2b471036342aa69bc5a602bc889cb0a06cda00477d0c69566757d5553d39" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zip" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" dependencies = [ "arbitrary", "bzip2", @@ -4475,27 +4611,27 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 62d1fd8..9e08de5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,12 +13,51 @@ members = [ exclude = ["lib/color-eyre"] [workspace.dependencies] -zip = { version = "2.1.3", default-features = false, features = ["deflate", "bzip2", "zstd", "time"] } -minijinja = { version = "2.0.1", default-features = false } - -[patch.crates-io] +ansi-parser = "0.9.1" +ansi_term = "0.12.1" +async-recursion = "1.0.5" +bincode = "1.3.3" +bitflags = "2.5.0" +byteorder = "1.4.3" +clap = { version = "4.0.15", features = ["color", "derive", "std", "cargo", "string", "unicode"] } +cli-table = { version = "0.4.7", default-features = false, features = ["derive"] } color-eyre = { path = "lib/color-eyre" } -ansi-parser = { git = "https://gitlab.com/lschwiderski/ansi-parser.git", branch = "issue/outdated-heapless", version = "0.9.1" } +colors-transform = "0.2.11" +confy = "0.6.1" +csv-async = { version = "1.2.4", features = ["tokio", "serde"] } +druid = { version = "0.8", features = ["im", "serde", "image", "png", "jpeg", "bmp", "webp", "svg"] } +druid-widget-nursery = "0.1" +dtmt-shared = { path = "lib/dtmt-shared" } +fastrand = "2.1.0" +futures = "0.3.25" +futures-util = "0.3.24" +glob = "0.3.0" +interprocess = "2.1.0" +lazy_static = "1.4.0" +luajit2-sys = { path = "lib/luajit2-sys" } +minijinja = { version = "2.0.1", default-features = false } +nanorand = "0.7.0" +nexusmods = { path = "lib/nexusmods" } +notify = "6.1.1" +oodle = { path = "lib/oodle" } +open = "5.0.1" +path-clean = "1.0.1" +path-slash = "0.2.1" +pin-project-lite = "0.2.9" +promptly = "0.3.1" +sdk = { path = "lib/sdk" } +serde = { version = "1.0.152", features = ["derive", "rc"] } +serde_sjson = { path = "lib/serde_sjson" } +steamlocate = "2.0.0-beta.2" +strip-ansi-escapes = "0.2.0" +time = { version = "0.3.20", features = ["serde", "serde-well-known", "local-offset", "formatting", "macros"] } +tokio = { version = "1.23.0", features = ["rt-multi-thread", "fs", "process", "macros", "tracing", "io-util", "io-std"] } +tokio-stream = { version = "0.1.12", features = ["fs", "io-util"] } +tracing = { version = "0.1.37", features = ["async-await"] } +tracing-error = "0.2.0" +tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } +usvg = "0.25.0" +zip = { version = "2.1.3", default-features = false, features = ["deflate", "bzip2", "zstd", "time"] } [profile.dev.package.backtrace] opt-level = 3 diff --git a/crates/dtmm/Cargo.toml b/crates/dtmm/Cargo.toml index b7bee49..52c0522 100644 --- a/crates/dtmm/Cargo.toml +++ b/crates/dtmm/Cargo.toml @@ -12,37 +12,37 @@ license-file = "LICENSE" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ansi-parser = "0.9.0" -async-recursion = "1.0.5" -bincode = "1.3.3" -bitflags = "2.5.0" -clap = { version = "4.0.15", features = ["color", "derive", "std", "cargo", "string", "unicode"] } -color-eyre = "0.6.2" -colors-transform = "0.2.11" -confy = "0.6.1" -druid = { version = "0.8", features = ["im", "serde", "image", "png", "jpeg", "bmp", "webp", "svg"] } -druid-widget-nursery = "0.1" -dtmt-shared = { path = "../../lib/dtmt-shared", version = "*" } -futures = "0.3.25" -interprocess = "2.1.0" -lazy_static = "1.4.0" -luajit2-sys = { path = "../../lib/luajit2-sys", version = "*" } +ansi-parser = { workspace = true } +async-recursion = { workspace = true } +bincode = { workspace = true } +bitflags = { workspace = true } +clap = { workspace = true } +color-eyre = { workspace = true } +colors-transform = { workspace = true } +confy = { workspace = true } +druid = { workspace = true } +druid-widget-nursery = { workspace = true } +dtmt-shared = { workspace = true } +futures = { workspace = true } +interprocess = { workspace = true } +lazy_static = { workspace = true } +luajit2-sys = { workspace = true } minijinja = { workspace = true } -nexusmods = { path = "../../lib/nexusmods", version = "*" } -oodle = { path = "../../lib/oodle", version = "*" } -open = "5.0.1" -path-slash = "0.2.1" -sdk = { path = "../../lib/sdk", version = "*" } -serde = { version = "1.0.152", features = ["derive", "rc"] } -serde_sjson = { path = "../../lib/serde_sjson", version = "*" } -strip-ansi-escapes = "0.2.0" -time = { version = "0.3.20", features = ["serde", "serde-well-known", "local-offset"] } -tokio = { version = "1.23.0", features = ["rt", "fs", "tracing", "sync"] } -tokio-stream = { version = "0.1.12", features = ["fs"] } -tracing = "0.1.37" -tracing-error = "0.2.0" -tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } -usvg = "0.25.0" +nexusmods = { workspace = true } +oodle = { workspace = true } +open = { workspace = true } +path-slash = { workspace = true } +sdk = { workspace = true } +serde = { workspace = true } +serde_sjson = { workspace = true } +strip-ansi-escapes = { workspace = true } +time = { workspace = true } +tokio = { workspace = true } +tokio-stream = { workspace = true } +tracing = { workspace = true } +tracing-error = { workspace = true } +tracing-subscriber = { workspace = true } +usvg = { workspace = true } zip = { workspace = true } [build-dependencies] diff --git a/crates/dtmt/Cargo.toml b/crates/dtmt/Cargo.toml index e2e3fb9..183d6a5 100644 --- a/crates/dtmt/Cargo.toml +++ b/crates/dtmt/Cargo.toml @@ -4,34 +4,36 @@ version = "0.3.0" edition = "2021" [dependencies] -clap = { version = "4.0.15", features = ["color", "derive", "std", "cargo", "unicode"] } -cli-table = { version = "0.4.7", default-features = false, features = ["derive"] } -color-eyre = "0.6.2" -confy = "0.6.1" -csv-async = { version = "1.2.4", features = ["tokio", "serde"] } -dtmt-shared = { path = "../../lib/dtmt-shared", version = "*" } -futures = "0.3.25" -futures-util = "0.3.24" -glob = "0.3.0" -nanorand = "0.7.0" -oodle = { path = "../../lib/oodle", version = "*" } -pin-project-lite = "0.2.9" -promptly = "0.3.1" -sdk = { path = "../../lib/sdk", version = "*" } -serde_sjson = { path = "../../lib/serde_sjson", version = "*" } -serde = { version = "1.0.147", features = ["derive"] } +async-recursion = { workspace = true } +clap = { workspace = true } +cli-table = { workspace = true } +color-eyre = { workspace = true } +confy = { workspace = true } +csv-async = { workspace = true } +dtmt-shared = { workspace = true } +futures = { workspace = true } +futures-util = { workspace = true } +glob = { workspace = true } +luajit2-sys = { workspace = true } minijinja = { workspace = true } -tokio-stream = { version = "0.1.11", features = ["fs", "io-util"] } -tokio = { version = "1.21.2", features = ["rt-multi-thread", "fs", "process", "macros", "tracing", "io-util", "io-std"] } -tracing-error = "0.2.0" -tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } -tracing = { version = "0.1.37", features = ["async-await"] } +nanorand = { workspace = true } +notify = { workspace = true } +oodle = { workspace = true } +path-clean = { workspace = true } +path-slash = { workspace = true } +pin-project-lite = { workspace = true } +promptly = { workspace = true } +sdk = { workspace = true } +serde = { workspace = true } +serde_sjson = { workspace = true } +tokio = { workspace = true } +tokio-stream = { workspace = true } +tracing = { workspace = true } +tracing-error = { workspace = true } +tracing-subscriber = { workspace = true } zip = { workspace = true } -path-clean = "1.0.1" -path-slash = "0.2.1" -async-recursion = "1.0.2" -notify = "6.1.1" -luajit2-sys = { path = "../../lib/luajit2-sys", version = "*" } + +# Cannot be a workspace dependencies when it's optional shlex = { version = "1.2.0", optional = true } [dev-dependencies] diff --git a/lib/color-eyre b/lib/color-eyre index b40962a..228b8ca 160000 --- a/lib/color-eyre +++ b/lib/color-eyre @@ -1 +1 @@ -Subproject commit b40962a61c748756d7da293d9fff26aca019603e +Subproject commit 228b8ca37ee79ab9afa45c40da415e4dcb029751 diff --git a/lib/dtmt-shared/Cargo.toml b/lib/dtmt-shared/Cargo.toml index b547dbe..26e1b6a 100644 --- a/lib/dtmt-shared/Cargo.toml +++ b/lib/dtmt-shared/Cargo.toml @@ -6,11 +6,11 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ansi_term = "0.12.1" -color-eyre = "0.6.2" -serde = "1.0.152" -steamlocate = "2.0.0-beta.2" -time = { version = "0.3.19", features = ["formatting", "local-offset", "macros"] } -tracing = "0.1.37" -tracing-error = "0.2.0" -tracing-subscriber = "0.3.16" +ansi_term = { workspace = true } +color-eyre = { workspace = true } +serde = { workspace = true } +steamlocate = { workspace = true } +time = { workspace = true } +tracing = { workspace = true } +tracing-error = { workspace = true } +tracing-subscriber = { workspace = true } diff --git a/lib/luajit2-sys b/lib/luajit2-sys index 5d1a075..6d94a4d 160000 --- a/lib/luajit2-sys +++ b/lib/luajit2-sys @@ -1 +1 @@ -Subproject commit 5d1a075742395f767c79d9c0d7466c6fb442f106 +Subproject commit 6d94a4dd2c296bf1f044ee4c70fb10dca4c1c241 diff --git a/lib/oodle/Cargo.toml b/lib/oodle/Cargo.toml index 6fc5039..feb9951 100644 --- a/lib/oodle/Cargo.toml +++ b/lib/oodle/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -color-eyre = "0.6.2" -tracing = "0.1.37" +color-eyre = { workspace = true } +tracing = { workspace = true } [build-dependencies] -bindgen = "0.69.4" +bindgen = "0.70.1" diff --git a/lib/oodle/src/lib.rs b/lib/oodle/src/lib.rs index 76b1d16..871daab 100644 --- a/lib/oodle/src/lib.rs +++ b/lib/oodle/src/lib.rs @@ -7,6 +7,7 @@ use std::ptr; use color_eyre::{eyre, Result}; #[allow(dead_code)] +#[allow(clippy::identity_op)] mod bindings { include!(concat!(env!("OUT_DIR"), "/bindings.rs")); } diff --git a/lib/sdk/Cargo.toml b/lib/sdk/Cargo.toml index b164d47..4667a1c 100644 --- a/lib/sdk/Cargo.toml +++ b/lib/sdk/Cargo.toml @@ -4,23 +4,23 @@ version = "0.3.0" edition = "2021" [dependencies] -bitflags = "2.5.0" -byteorder = "1.4.3" -color-eyre = "0.6.2" -csv-async = { version = "1.2.4", features = ["tokio", "serde"] } -fastrand = "2.1.0" -futures = "0.3.25" -futures-util = "0.3.24" -glob = "0.3.0" -nanorand = "0.7.0" -pin-project-lite = "0.2.9" -serde = { version = "1.0.147", features = ["derive"] } -serde_sjson = { path = "../../lib/serde_sjson", version = "*" } -oodle = { path = "../../lib/oodle", version = "*" } -tokio = { version = "1.21.2", features = ["rt-multi-thread", "fs", "process", "macros", "tracing", "io-util", "io-std"] } -tokio-stream = { version = "0.1.11", features = ["fs", "io-util"] } -tracing = { version = "0.1.37", features = ["async-await"] } -tracing-error = "0.2.0" -luajit2-sys = { path = "../../lib/luajit2-sys", version = "*" } -async-recursion = "1.0.2" -path-slash = "0.2.1" +async-recursion = { workspace = true } +bitflags = { workspace = true } +byteorder = { workspace = true } +color-eyre = { workspace = true } +csv-async = { workspace = true } +fastrand = { workspace = true } +futures = { workspace = true } +futures-util = { workspace = true } +glob = { workspace = true } +luajit2-sys = { workspace = true } +nanorand = { workspace = true } +oodle = { workspace = true } +path-slash = { workspace = true } +pin-project-lite = { workspace = true } +serde = { workspace = true } +serde_sjson = { workspace = true } +tokio = { workspace = true } +tokio-stream = { workspace = true } +tracing = { workspace = true } +tracing-error = { workspace = true } From 7cb44532b23582e3e37969f1d8337c25ce45b1ae Mon Sep 17 00:00:00 2001 From: Renovate Date: Wed, 21 Aug 2024 12:31:14 +0000 Subject: [PATCH 26/99] Add .renovaterc --- .renovaterc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .renovaterc diff --git a/.renovaterc b/.renovaterc new file mode 100644 index 0000000..b36f3b4 --- /dev/null +++ b/.renovaterc @@ -0,0 +1,11 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + ":combinePatchMinorReleases", + ":enableVulnerabilityAlerts", + ":rebaseStalePrs" + ], + "prConcurrentLimit": 10, + "branchPrefix": "renovate/" +} From 4d665200fa36905fe453c3e312f5abf50633f903 Mon Sep 17 00:00:00 2001 From: Renovate Date: Fri, 23 Aug 2024 21:30:32 +0000 Subject: [PATCH 27/99] fix(deps): update rust crate serde_json to v1.0.127 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26ccff7..5b85e79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3222,9 +3222,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.125" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", "memchr", From ffd4927d27140365948cddc00cbda2ba398bb022 Mon Sep 17 00:00:00 2001 From: Renovate Date: Sat, 24 Aug 2024 10:02:43 +0000 Subject: [PATCH 28/99] chore(deps): update rust crate fastrand to v2.1.1 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b85e79..4789666 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1059,9 +1059,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fd-lock" From 67c64bb3579b31073f38a57d4cd4208d665bb378 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 26 Aug 2024 20:45:40 +0000 Subject: [PATCH 29/99] chore(deps): update rust crate minijinja to v2.2.0 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4789666..4add151 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2128,9 +2128,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf369fce3289017a63e514dfca10a0a6f1a02216b21b588b79f6a1081eb999f5" +checksum = "6d7d3e3a3eece1fa4618237ad41e1de855ced47eab705cec1c9a920e1d1c5aad" dependencies = [ "serde", ] From 659b63bfe998da90fcab4e88d4a94c7b8653bd1b Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 27 Aug 2024 06:30:39 +0000 Subject: [PATCH 30/99] fix(deps): update rust crate serde to v1.0.209 --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4add151..e187021 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3202,18 +3202,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", From 72ce06b0e5dbe695842340604941bc69b00c8437 Mon Sep 17 00:00:00 2001 From: Renovate Date: Fri, 25 Oct 2024 17:32:26 +0000 Subject: [PATCH 31/99] chore(deps): update rust crate notify to v7 --- Cargo.lock | 47 ++++++++++++++++++----------------------------- Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e187021..7e460c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -657,15 +657,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -1790,9 +1781,9 @@ dependencies = [ [[package]] name = "inotify" -version = "0.9.6" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" dependencies = [ "bitflags 1.3.2", "inotify-sys", @@ -2160,18 +2151,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - [[package]] name = "mio" version = "1.0.2" @@ -2180,6 +2159,7 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", + "log", "wasi", "windows-sys 0.52.0", ] @@ -2269,21 +2249,30 @@ dependencies = [ [[package]] name = "notify" -version = "6.1.1" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009" dependencies = [ "bitflags 2.6.0", - "crossbeam-channel", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", "log", - "mio 0.8.11", + "mio", + "notify-types", "walkdir", - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "notify-types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7393c226621f817964ffb3dc5704f9509e107a8b024b489cc2c1b217378785df" +dependencies = [ + "instant", ] [[package]] @@ -3648,7 +3637,7 @@ dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.2", + "mio", "pin-project-lite", "signal-hook-registry", "socket2", diff --git a/Cargo.toml b/Cargo.toml index 9e08de5..0ff601e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ luajit2-sys = { path = "lib/luajit2-sys" } minijinja = { version = "2.0.1", default-features = false } nanorand = "0.7.0" nexusmods = { path = "lib/nexusmods" } -notify = "6.1.1" +notify = "7.0.0" oodle = { path = "lib/oodle" } open = "5.0.1" path-clean = "1.0.1" From b219e20f3adb62f0dc8f4717484af6bdbd723416 Mon Sep 17 00:00:00 2001 From: Renovate Date: Fri, 6 Dec 2024 20:32:37 +0000 Subject: [PATCH 32/99] chore(deps): update rust crate bindgen to 0.71.0 --- Cargo.lock | 38 ++++++++++++++++++++++++++++++++------ lib/oodle/Cargo.toml | 2 +- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e460c7..6f6bc4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -231,7 +231,27 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.75", +] + +[[package]] +name = "bindgen" +version = "0.71.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "360897d4f2fdeea5d32f6dac9287952ae5babdc2aad42ad787c9470a4a6e3fee" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.0", "shlex", "syn 2.0.75", ] @@ -1122,7 +1142,7 @@ dependencies = [ "fluent-syntax", "intl-memoizer", "intl_pluralrules", - "rustc-hash", + "rustc-hash 1.1.0", "self_cell 0.10.3", "smallvec", "unic-langid", @@ -2038,7 +2058,7 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" name = "luajit2-sys" version = "0.0.2" dependencies = [ - "bindgen", + "bindgen 0.70.1", "cc", "fs_extra", "libc", @@ -2337,7 +2357,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" name = "oodle" version = "0.1.0" dependencies = [ - "bindgen", + "bindgen 0.71.0", "color-eyre", "tracing", ] @@ -2981,6 +3001,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustc_version" version = "0.4.0" @@ -3883,7 +3909,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" dependencies = [ - "rustc-hash", + "rustc-hash 1.1.0", ] [[package]] diff --git a/lib/oodle/Cargo.toml b/lib/oodle/Cargo.toml index feb9951..e679b5f 100644 --- a/lib/oodle/Cargo.toml +++ b/lib/oodle/Cargo.toml @@ -10,4 +10,4 @@ color-eyre = { workspace = true } tracing = { workspace = true } [build-dependencies] -bindgen = "0.70.1" +bindgen = "0.71.0" From adf9610eccb6d277fd962f4850de78d273502d00 Mon Sep 17 00:00:00 2001 From: Renovate Date: Fri, 10 Jan 2025 14:48:31 +0000 Subject: [PATCH 33/99] chore(deps): update rust crate notify to v8 --- Cargo.lock | 45 +++++++++++++++++++++------------------------ Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f6bc4f..67e6323 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,7 +222,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cexpr", "clang-sys", "itertools", @@ -242,7 +242,7 @@ version = "0.71.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "360897d4f2fdeea5d32f6dac9287952ae5babdc2aad42ad787c9470a4a6e3fee" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cexpr", "clang-sys", "itertools", @@ -264,9 +264,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" [[package]] name = "bitmaps" @@ -917,7 +917,7 @@ dependencies = [ "ansi-parser", "async-recursion", "bincode", - "bitflags 2.6.0", + "bitflags 2.7.0", "clap", "color-eyre", "colors-transform", @@ -1801,11 +1801,11 @@ dependencies = [ [[package]] name = "inotify" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" +checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.7.0", "inotify-sys", "libc", ] @@ -2031,7 +2031,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "libc", "redox_syscall", ] @@ -2269,11 +2269,11 @@ dependencies = [ [[package]] name = "notify" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009" +checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "filetime", "fsevent-sys", "inotify", @@ -2283,17 +2283,14 @@ dependencies = [ "mio", "notify-types", "walkdir", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "notify-types" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7393c226621f817964ffb3dc5704f9509e107a8b024b489cc2c1b217378785df" -dependencies = [ - "instant", -] +checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" [[package]] name = "nu-ansi-term" @@ -2379,7 +2376,7 @@ version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg-if", "foreign-types", "libc", @@ -2831,7 +2828,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -3022,7 +3019,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "errno", "libc", "linux-raw-sys", @@ -3150,7 +3147,7 @@ name = "sdk" version = "0.3.0" dependencies = [ "async-recursion", - "bitflags 2.6.0", + "bitflags 2.7.0", "byteorder", "color-eyre", "csv-async", @@ -3177,7 +3174,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation", "core-foundation-sys", "libc", @@ -3486,7 +3483,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation", "system-configuration-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 0ff601e..3f00fe6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ luajit2-sys = { path = "lib/luajit2-sys" } minijinja = { version = "2.0.1", default-features = false } nanorand = "0.7.0" nexusmods = { path = "lib/nexusmods" } -notify = "7.0.0" +notify = "8.0.0" oodle = { path = "lib/oodle" } open = "5.0.1" path-clean = "1.0.1" From a3583b4485196e3446ccd51da401b0ebe5860811 Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 10 Dec 2024 10:18:35 +0000 Subject: [PATCH 34/99] fix(deps): update rust crate thiserror to v2 --- Cargo.lock | 90 ++++++++++++++++++++++++---------------- lib/nexusmods/Cargo.toml | 2 +- lib/nexusmods/src/lib.rs | 4 +- 3 files changed, 58 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f6bc4f..ccb479f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,7 +141,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -233,7 +233,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -253,7 +253,7 @@ dependencies = [ "regex", "rustc-hash 2.1.0", "shlex", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -354,7 +354,7 @@ dependencies = [ "glib", "libc", "once_cell", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -448,7 +448,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -532,7 +532,7 @@ dependencies = [ "once_cell", "owo-colors", "pretty_assertions", - "thiserror", + "thiserror 1.0.63", "tracing", "tracing-error", "tracing-subscriber", @@ -578,7 +578,7 @@ checksum = "45b1f4c00870f07dc34adcac82bb6a72cc5aabca8536ba1797e01df51d2ce9a0" dependencies = [ "directories", "serde", - "thiserror", + "thiserror 1.0.63", "toml 0.8.19", ] @@ -742,7 +742,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -820,7 +820,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -1163,7 +1163,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a530c4694a6a8d528794ee9bbd8ba0122e779629ac908d15ad5a7ae7763a33d" dependencies = [ - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -1288,7 +1288,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -1434,7 +1434,7 @@ dependencies = [ "once_cell", "pin-project-lite", "smallvec", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -1469,7 +1469,7 @@ dependencies = [ "libc", "once_cell", "smallvec", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -1950,7 +1950,7 @@ checksum = "7e4c8354918309196302015ac9cae43362f1a13d0d5c5539a33b4c2fd2cd6d25" dependencies = [ "pest", "pest_derive", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -1961,7 +1961,7 @@ checksum = "0447866c47c00f8bd1949618e8f63017cf93e985b4684dc28d784527e2882390" dependencies = [ "keyvalues-parser", "serde", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -2217,7 +2217,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror", + "thiserror 2.0.6", "time", "tokio", "tracing", @@ -2396,7 +2396,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -2519,7 +2519,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.63", "ucd-trie", ] @@ -2543,7 +2543,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -2667,7 +2667,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -2724,7 +2724,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -2763,9 +2763,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2842,7 +2842,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -3232,7 +3232,7 @@ checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -3462,9 +3462,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -3548,7 +3548,16 @@ version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.63", +] + +[[package]] +name = "thiserror" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" +dependencies = [ + "thiserror-impl 2.0.6", ] [[package]] @@ -3559,7 +3568,18 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] @@ -3680,7 +3700,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -3828,7 +3848,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -4212,7 +4232,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -4246,7 +4266,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4280,7 +4300,7 @@ checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.90", ] [[package]] @@ -4604,7 +4624,7 @@ dependencies = [ "flate2", "indexmap", "memchr", - "thiserror", + "thiserror 1.0.63", "time", "zopfli", "zstd", diff --git a/lib/nexusmods/Cargo.toml b/lib/nexusmods/Cargo.toml index 2f90a46..b9cc879 100644 --- a/lib/nexusmods/Cargo.toml +++ b/lib/nexusmods/Cargo.toml @@ -12,7 +12,7 @@ regex = "1.7.1" reqwest = { version = "0.12.4" } serde = { version = "1.0.152", features = ["derive"] } serde_json = "1.0.94" -thiserror = "1.0.39" +thiserror = "2.0.0" time = { version = "0.3.20", features = ["serde"] } tracing = "0.1.37" url = { version = "2.3.1", features = ["serde"] } diff --git a/lib/nexusmods/src/lib.rs b/lib/nexusmods/src/lib.rs index 314acb1..cddf6a0 100644 --- a/lib/nexusmods/src/lib.rs +++ b/lib/nexusmods/src/lib.rs @@ -28,7 +28,7 @@ pub enum Error { HTTP(#[from] reqwest::Error), #[error("invalid URL: {0:?}")] URLParseError(#[from] url::ParseError), - #[error("failed to deserialize '{error}': {json}")] + #[error("failed to deserialize due to {error}: {json}")] Deserialize { json: String, error: serde_json::Error, @@ -37,7 +37,7 @@ pub enum Error { InvalidHeaderValue(#[from] InvalidHeaderValue), #[error("this error cannot happen")] Infallible(#[from] Infallible), - #[error("invalid NXM URL '{}': {0}", .1.as_str())] + #[error("invalid NXM URL '{url}': {0}", url = .1.as_str())] InvalidNXM(&'static str, Url), #[error("{0}")] Custom(String), From 5612e271fbde6b8808cc8d4c318099bec124f7b1 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 12 Mar 2025 11:26:24 +0100 Subject: [PATCH 35/99] Improve version name for CI artifacts built off master The name from `git describe --tags` is rather confusing to people that aren't familiar with it. Especially in the current situation, where there are no proper versioned releases. A name like `master-123456` should be much clearer. Closes #205. --- .ci/tasks/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/tasks/build.sh b/.ci/tasks/build.sh index bb96775..11b0300 100755 --- a/.ci/tasks/build.sh +++ b/.ci/tasks/build.sh @@ -25,7 +25,8 @@ if [ -n "$PR" ]; then title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')" ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')" else - ref=$(git describe --tags) + ref=$(cat .git/ref || echo "HEAD") + ref=$(git rev-parse --abbrev-ref $ref)-$(git rev-parse --short $ref) fi title "Version: '$ref'" From beba47f340ea5f1990458029752ca0b138f226a6 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 12 Mar 2025 11:33:48 +0100 Subject: [PATCH 36/99] Push a packaged with a fixed version for master To provide something that can easily be linked to, also push packages built from `master` to a version that doesn't contain the SHA. --- .ci/pipelines/base.yml | 38 +++++++++++++++++++++++++++++++------- .ci/tasks/build.yml | 1 - 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.ci/pipelines/base.yml b/.ci/pipelines/base.yml index 474c090..8d3cc77 100644 --- a/.ci/pipelines/base.yml +++ b/.ci/pipelines/base.yml @@ -125,8 +125,6 @@ jobs: vars: pr: "" target: msvc - gitea_url: http://forgejo:3000 - gitea_api_key: ((gitea_api_key)) - load_var: version_number reveal: true @@ -142,10 +140,21 @@ jobs: fail_fast: true override: true globs: - - artifact/dtmt - - artifact/dtmm - artifact/*.exe - - artifact/*.sha256 + - artifact/*.exe.sha256 + + - put: package + resource: gitea-package + no_get: true + inputs: + - artifact + params: + version: master + fail_fast: true + override: true + globs: + - artifact/*.exe + - artifact/*.exe.sha256 - name: build-linux on_success: @@ -202,5 +211,20 @@ jobs: globs: - artifact/dtmt - artifact/dtmm - - artifact/*.exe - - artifact/*.sha256 + - artifact/dtmm.sha256 + - artifact/dtmt.sha256 + + - put: package + resource: gitea-package + no_get: true + inputs: + - artifact + params: + version: master + fail_fast: true + override: true + globs: + - artifact/dtmt + - artifact/dtmm + - artifact/dtmm.sha256 + - artifact/dtmt.sha256 diff --git a/.ci/tasks/build.yml b/.ci/tasks/build.yml index dce44d0..a7f47b4 100644 --- a/.ci/tasks/build.yml +++ b/.ci/tasks/build.yml @@ -22,7 +22,6 @@ caches: params: CI: "true" TARGET: ((target)) - GITEA_API_KEY: ((gitea_api_key)) PR: ((pr)) OUTPUT: artifact From d15f533e19edbde4062eeb2161418b90fdb859b0 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 12 Mar 2025 11:52:53 +0100 Subject: [PATCH 37/99] Fix branch name in package version --- .ci/tasks/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/tasks/build.sh b/.ci/tasks/build.sh index 11b0300..3cb9776 100755 --- a/.ci/tasks/build.sh +++ b/.ci/tasks/build.sh @@ -26,7 +26,11 @@ if [ -n "$PR" ]; then ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')" else ref=$(cat .git/ref || echo "HEAD") - ref=$(git rev-parse --abbrev-ref $ref)-$(git rev-parse --short $ref) + branch=$(git rev-parse --abbrev-ref $ref) + if [ -z "$branch" ]; then + branch=$(cat .git/ref) + fi + ref=${branch}-$(git rev-parse --short $ref) fi title "Version: '$ref'" From 71f945a96c95742c4655c5b05ff4b7696905bf3c Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 12 Mar 2025 13:11:01 +0100 Subject: [PATCH 38/99] Explicitly define base branches Currently, the dependency dashboard lists a bunch of pending updates under a section called "Other branches". I'm not sure, but this sounds like one of the configs I extend from enables base branches other than only the default. To test, and make it explicit, set only the branches I really want checked. I'm adding the `release/.*` regex for now, even though I don't have any release process yet. --- .renovaterc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.renovaterc b/.renovaterc index b36f3b4..4a2fbf4 100644 --- a/.renovaterc +++ b/.renovaterc @@ -7,5 +7,9 @@ ":rebaseStalePrs" ], "prConcurrentLimit": 10, - "branchPrefix": "renovate/" + "branchPrefix": "renovate/", + "baseBranches": [ + "$default", + "/^release\\/.*/" + ] } From 6ba13ac1ec06c0334cccfda1fd022d7cfd291b7c Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 12 Mar 2025 13:24:03 +0100 Subject: [PATCH 39/99] Fix using branch for version number --- .ci/tasks/build.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.ci/tasks/build.sh b/.ci/tasks/build.sh index 3cb9776..0b4f2aa 100755 --- a/.ci/tasks/build.sh +++ b/.ci/tasks/build.sh @@ -24,13 +24,10 @@ PR=${PR:-} if [ -n "$PR" ]; then title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')" ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')" +elif [ -f ".git/branch"]; then + ref=$(cat .git/branch)-$(git rev-parse --short $ref) else - ref=$(cat .git/ref || echo "HEAD") - branch=$(git rev-parse --abbrev-ref $ref) - if [ -z "$branch" ]; then - branch=$(cat .git/ref) - fi - ref=${branch}-$(git rev-parse --short $ref) + ref=$(git rev-parse --short "$(cat .git/ref || echo "HEAD")") fi title "Version: '$ref'" From e61a252ee643d958d4e7eac93aa098e99fce7118 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 15:18:19 +0200 Subject: [PATCH 40/99] Remove internal URLs from CI Due to using internal URLs, the pipelines demanded a very specific network setup to work. By changing everything to their public-facing URLs, they now become agnostic to internal topology. --- .ci/pipelines/base.yml | 24 ++++++++++++++++-------- .ci/pipelines/pr.yml | 22 +++++++++++++--------- Justfile | 4 +++- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/.ci/pipelines/base.yml b/.ci/pipelines/base.yml index 8d3cc77..79c1e51 100644 --- a/.ci/pipelines/base.yml +++ b/.ci/pipelines/base.yml @@ -6,24 +6,30 @@ resource_types: - name: gitea-package type: registry-image source: - repository: registry.local:5000/gitea-package + repository: registry.sclu1034.dev/gitea-package + username: ((registry_user)) + password: ((registry_password)) - name: gitea-status type: registry-image source: - repository: registry.local:5000/gitea-status + repository: registry.sclu1034.dev/gitea-status + username: ((registry_user)) + password: ((registry_password)) - name: gitea-pr type: registry-image source: - repository: registry.local:5000/gitea-pr + repository: registry.sclu1034.dev/gitea-pr + username: ((registry_user)) + password: ((registry_password)) resources: - name: repo type: git source: - uri: http://forgejo:3000/bitsquid_dt/dtmt + uri: http://git.sclu1034.dev/bitsquid_dt/dtmt branch: master - name: repo-pr @@ -38,7 +44,7 @@ resources: type: gitea-package source: access_token: ((gitea_api_key)) - url: http://forgejo:3000 + url: http://git.sclu1034.dev owner: bitsquid_dt type: generic name: dtmt @@ -48,7 +54,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://forgejo:3000 + url: http://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/msvc @@ -58,7 +64,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://forgejo:3000 + url: http://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/linux @@ -85,6 +91,8 @@ jobs: vars: pr: ((.:pr)) gitea_api_key: ((gitea_api_key)) + registry_user: ((registry_user)) + registry_password: ((registry_password)) instance_vars: number: ((.:pr.number)) @@ -192,7 +200,7 @@ jobs: vars: pr: "" target: linux - gitea_url: http://forgejo:3000 + gitea_url: http://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) - load_var: version_number diff --git a/.ci/pipelines/pr.yml b/.ci/pipelines/pr.yml index bca0ebb..b2f514a 100644 --- a/.ci/pipelines/pr.yml +++ b/.ci/pipelines/pr.yml @@ -6,26 +6,30 @@ resource_types: - name: gitea-package type: registry-image source: - repository: registry.local:5000/gitea-package + repository: registry.sclu1034.dev/gitea-package + username: ((registry_user)) + password: ((registry_password)) - name: gitea-status type: registry-image source: - repository: registry.local:5000/gitea-status + repository: registry.sclu1034.dev/gitea-status + username: ((registry_user)) + password: ((registry_password)) resources: - name: repo type: git source: - uri: http://forgejo:3000/bitsquid_dt/dtmt + uri: http://git.sclu1034.dev/bitsquid_dt/dtmt branch: ((pr.head.ref)) - name: gitea-package type: gitea-package source: access_token: ((gitea_api_key)) - url: http://forgejo:3000 + url: http://git.sclu1034.dev owner: bitsquid_dt type: generic name: dtmt @@ -34,7 +38,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://forgejo:3000 + url: http://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: lint/clippy @@ -44,7 +48,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://forgejo:3000 + url: http://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/msvc @@ -54,7 +58,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://forgejo:3000 + url: http://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/linux @@ -135,7 +139,7 @@ jobs: vars: target: msvc pr: ((pr)) - gitea_url: http://forgejo:3000 + gitea_url: http://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) - load_var: version_number @@ -193,7 +197,7 @@ jobs: vars: target: linux pr: ((pr)) - gitea_url: http://forgejo:3000 + gitea_url: http://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) - load_var: version_number diff --git a/Justfile b/Justfile index dbecc22..697bdcc 100644 --- a/Justfile +++ b/Justfile @@ -40,6 +40,8 @@ set-base-pipeline: --pipeline dtmt \ --config .ci/pipelines/base.yml \ -v gitea_api_key=${GITEA_API_KEY} \ + -v registry_user=${REGISTRY_USER} \ + -v registry_password=${REGISTRY_PASSWORD} \ -v owner=bitsquid_dt \ -v repo=dtmt @@ -48,7 +50,7 @@ set-pr-pipeline pr: -H "Authorization: ${GITEA_API_KEY}" \ -H 'Accept: application/json' \ 'https://git.sclu1034.dev/api/v1/repos/bitsquid_dt/dtmt/pulls/{{pr}}' \ - | yq -y '.' - > 'pr-{{pr}}.yaml' + | yq -y '.' - > 'pr-{{pr}}.yaml' fly -t main set-pipeline \ --pipeline dtmt-pr \ --config .ci/pipelines/pr.yml \ From 5aa8421f7dcc702f4fdfaef814056ce51c34a201 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 15:28:27 +0200 Subject: [PATCH 41/99] Fix incorrect URLs --- .ci/pipelines/base.yml | 10 +++++----- .ci/pipelines/pr.yml | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.ci/pipelines/base.yml b/.ci/pipelines/base.yml index 79c1e51..ce2682c 100644 --- a/.ci/pipelines/base.yml +++ b/.ci/pipelines/base.yml @@ -29,7 +29,7 @@ resources: - name: repo type: git source: - uri: http://git.sclu1034.dev/bitsquid_dt/dtmt + uri: https://git.sclu1034.dev/bitsquid_dt/dtmt branch: master - name: repo-pr @@ -44,7 +44,7 @@ resources: type: gitea-package source: access_token: ((gitea_api_key)) - url: http://git.sclu1034.dev + url: https://git.sclu1034.dev owner: bitsquid_dt type: generic name: dtmt @@ -54,7 +54,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://git.sclu1034.dev + url: https://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/msvc @@ -64,7 +64,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://git.sclu1034.dev + url: https://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/linux @@ -200,7 +200,7 @@ jobs: vars: pr: "" target: linux - gitea_url: http://git.sclu1034.dev + gitea_url: https://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) - load_var: version_number diff --git a/.ci/pipelines/pr.yml b/.ci/pipelines/pr.yml index b2f514a..3198410 100644 --- a/.ci/pipelines/pr.yml +++ b/.ci/pipelines/pr.yml @@ -22,14 +22,14 @@ resources: - name: repo type: git source: - uri: http://git.sclu1034.dev/bitsquid_dt/dtmt + uri: https://git.sclu1034.dev/bitsquid_dt/dtmt branch: ((pr.head.ref)) - name: gitea-package type: gitea-package source: access_token: ((gitea_api_key)) - url: http://git.sclu1034.dev + url: https://git.sclu1034.dev owner: bitsquid_dt type: generic name: dtmt @@ -38,7 +38,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://git.sclu1034.dev + url: https://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: lint/clippy @@ -48,7 +48,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://git.sclu1034.dev + url: https://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/msvc @@ -58,7 +58,7 @@ resources: type: gitea-status source: access_token: ((gitea_api_key)) - url: http://git.sclu1034.dev + url: https://git.sclu1034.dev owner: bitsquid_dt repo: dtmt context: build/linux @@ -139,7 +139,7 @@ jobs: vars: target: msvc pr: ((pr)) - gitea_url: http://git.sclu1034.dev + gitea_url: https://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) - load_var: version_number @@ -197,7 +197,7 @@ jobs: vars: target: linux pr: ((pr)) - gitea_url: http://git.sclu1034.dev + gitea_url: https://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) - load_var: version_number From c2207c22ef3c6ea384ab617b4f516e79009cc1b5 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 15:33:33 +0200 Subject: [PATCH 42/99] Fix more URLs in CI pipelines --- .ci/pipelines/base.yml | 4 ++++ .ci/pipelines/check.yml | 4 ++++ .ci/pipelines/pr.yml | 6 ++++++ .ci/tasks/build.yml | 4 +++- .ci/tasks/clippy.yml | 4 +++- 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.ci/pipelines/base.yml b/.ci/pipelines/base.yml index ce2682c..a5b0b6e 100644 --- a/.ci/pipelines/base.yml +++ b/.ci/pipelines/base.yml @@ -133,6 +133,8 @@ jobs: vars: pr: "" target: msvc + registry_user: ((registry_user)) + registry_password: ((registry_password)) - load_var: version_number reveal: true @@ -202,6 +204,8 @@ jobs: target: linux gitea_url: https://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) + registry_user: ((registry_user)) + registry_password: ((registry_password)) - load_var: version_number reveal: true diff --git a/.ci/pipelines/check.yml b/.ci/pipelines/check.yml index 4d350ac..c8d5d47 100644 --- a/.ci/pipelines/check.yml +++ b/.ci/pipelines/check.yml @@ -18,6 +18,8 @@ jobs: file: repo/.ci/tasks/build.yml vars: target: msvc + registry_user: ((registry_user)) + registry_password: ((registry_password)) - name: build-linux plan: - get: repo @@ -26,3 +28,5 @@ jobs: file: repo/.ci/tasks/build.yml vars: target: linux + registry_user: ((registry_user)) + registry_password: ((registry_password)) diff --git a/.ci/pipelines/pr.yml b/.ci/pipelines/pr.yml index 3198410..5c8d7cd 100644 --- a/.ci/pipelines/pr.yml +++ b/.ci/pipelines/pr.yml @@ -101,6 +101,8 @@ jobs: file: repo/.ci/tasks/clippy.yml vars: gitea_api_key: ((gitea_api_key)) + registry_user: ((registry_user)) + registry_password: ((registry_password)) - name: build-msvc @@ -141,6 +143,8 @@ jobs: pr: ((pr)) gitea_url: https://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) + registry_user: ((registry_user)) + registry_password: ((registry_password)) - load_var: version_number reveal: true @@ -199,6 +203,8 @@ jobs: pr: ((pr)) gitea_url: https://git.sclu1034.dev gitea_api_key: ((gitea_api_key)) + registry_user: ((registry_user)) + registry_password: ((registry_password)) - load_var: version_number reveal: true diff --git a/.ci/tasks/build.yml b/.ci/tasks/build.yml index a7f47b4..9b9c094 100644 --- a/.ci/tasks/build.yml +++ b/.ci/tasks/build.yml @@ -6,7 +6,9 @@ image_resource: name: ctmt-bi-base-((target)) type: registry-image source: - repository: registry.local:5000/dtmt-ci-base-((target)) + repository: registry.sclu1034.dev/dtmt-ci-base-((target)) + username: ((registry_user)) + password: ((registry_password)) tag: latest inputs: diff --git a/.ci/tasks/clippy.yml b/.ci/tasks/clippy.yml index 483cb30..806dfd4 100644 --- a/.ci/tasks/clippy.yml +++ b/.ci/tasks/clippy.yml @@ -6,7 +6,9 @@ image_resource: name: dtmt-ci-base-linux type: registry-image source: - repository: registry.local:5000/dtmt-ci-base-linux + repository: registry.sclu1034.dev/dtmt-ci-base-linux + username: ((registry_user)) + password: ((registry_password)) tag: latest inputs: From 1b56acfd6328dc96e74365cd16c838bf95e5f45b Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 13:42:19 +0000 Subject: [PATCH 43/99] chore(deps): update rust crate bindgen to v0.71.1 --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a9af3f..6fe2e80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,9 +238,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.71.0" +version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360897d4f2fdeea5d32f6dac9287952ae5babdc2aad42ad787c9470a4a6e3fee" +checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ "bitflags 2.7.0", "cexpr", @@ -2022,7 +2022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -2354,7 +2354,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" name = "oodle" version = "0.1.0" dependencies = [ - "bindgen 0.71.0", + "bindgen 0.71.1", "color-eyre", "tracing", ] From 96c0953cf9e1a6610859806e680c3993526e0a5a Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 13:42:24 +0000 Subject: [PATCH 44/99] chore(deps): update rust crate clap to v4.5.37 --- Cargo.lock | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a9af3f..516a0e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -417,9 +417,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", "clap_derive", @@ -427,23 +427,23 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", "unicase", - "unicode-width", + "unicode-width 0.2.0", ] [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -453,9 +453,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "cli-table" @@ -465,7 +465,7 @@ checksum = "b53f9241f288a7b12c56565f04aaeaeeab6b8923d42d99255d4ca428b4d97f89" dependencies = [ "cli-table-derive", "termcolor", - "unicode-width", + "unicode-width 0.1.13", ] [[package]] @@ -2022,7 +2022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -3101,7 +3101,7 @@ dependencies = [ "scopeguard", "smallvec", "unicode-segmentation", - "unicode-width", + "unicode-width 0.1.13", "utf8parse", "winapi", ] @@ -4082,6 +4082,12 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "untrusted" version = "0.9.0" From 5fa6ecfd0d0faea187fed641b8da2a8225f5170b Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 13:42:33 +0000 Subject: [PATCH 45/99] chore(deps): update rust crate interprocess to v2.2.3 --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a9af3f..0def154 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1833,9 +1833,9 @@ dependencies = [ [[package]] name = "interprocess" -version = "2.2.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" +checksum = "d941b405bd2322993887859a8ee6ac9134945a24ec5ec763a8a962fc64dfec2d" dependencies = [ "doctest-file", "libc", @@ -2022,7 +2022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] From 9e209add0c46e6f1cc4d33d96a05ae6b8bd23ac0 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 13:42:36 +0000 Subject: [PATCH 46/99] chore(deps): update rust crate open to v5.3.2 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a9af3f..2d95ba6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2361,9 +2361,9 @@ dependencies = [ [[package]] name = "open" -version = "5.3.0" +version = "5.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95" dependencies = [ "is-wsl", "libc", From f1291bdf33cb609ac72f6dec7e88a00dcea87442 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 13:42:40 +0000 Subject: [PATCH 47/99] chore(deps): update rust crate pin-project-lite to v0.2.16 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a9af3f..a2c61f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2669,9 +2669,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" From b19225c75a4b647b9a58f8282c3197a5a4109fbd Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 13:42:48 +0000 Subject: [PATCH 48/99] chore(deps): update rust crate strip-ansi-escapes to v0.2.1 --- Cargo.lock | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a9af3f..695fa27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3408,9 +3408,9 @@ dependencies = [ [[package]] name = "strip-ansi-escapes" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ff8ef943b384c414f54aefa961dd2bd853add74ec75e7ac74cf91dba62bcfa" +checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" dependencies = [ "vte", ] @@ -4164,22 +4164,11 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vte" -version = "0.11.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" +checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" dependencies = [ - "utf8parse", - "vte_generate_state_changes", -] - -[[package]] -name = "vte_generate_state_changes" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" -dependencies = [ - "proc-macro2", - "quote", + "memchr", ] [[package]] From 86b8f9e40ff19b9510023c36774c2a24262b09fc Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:16:06 +0000 Subject: [PATCH 49/99] chore(deps): update rust crate glob to v0.3.2 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b29c8f..ffd7666 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1499,9 +1499,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "gobject-sys" From 64d9aa12aac1bb5594cc93ebd03174875dfe1486 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:16:16 +0000 Subject: [PATCH 50/99] chore(deps): update rust crate tokio-stream to v0.1.17 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b29c8f..93832be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3723,9 +3723,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", From f2bf1493e528e887df4545cb0f66f29087b3ad67 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:16:28 +0000 Subject: [PATCH 51/99] fix(deps): update rust crate reqwest to v0.12.15 --- Cargo.lock | 180 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 120 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b29c8f..6f34a57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1673,9 +1673,9 @@ checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "hyper" -version = "1.4.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", @@ -1726,9 +1726,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" dependencies = [ "bytes", "futures-channel", @@ -1736,10 +1736,10 @@ dependencies = [ "http", "http-body", "hyper", + "libc", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1926,10 +1926,11 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -2011,9 +2012,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libloading" @@ -2647,26 +2648,6 @@ dependencies = [ "xi-unicode", ] -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -2888,9 +2869,9 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" dependencies = [ "base64 0.22.1", "bytes", @@ -2921,6 +2902,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", + "tower", "tower-service", "url", "wasm-bindgen", @@ -3066,6 +3048,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" + [[package]] name = "rustybuzz" version = "0.6.0" @@ -3357,9 +3345,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3801,14 +3789,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -4204,24 +4192,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.90", @@ -4242,9 +4230,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4252,9 +4240,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -4265,9 +4253,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-bindgen-test" @@ -4339,7 +4330,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -4349,33 +4340,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-registry" -version = "0.2.0" +name = "windows-link" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -4429,13 +4425,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -4448,6 +4460,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4460,6 +4478,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4472,12 +4496,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4490,6 +4526,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4502,6 +4544,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4514,6 +4562,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4526,6 +4580,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.5.40" From e6744404a948f211a0dbba2eb8528cfcfc6c6cd8 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 17:35:58 +0200 Subject: [PATCH 52/99] Make PR pipelines public --- .ci/pipelines/base.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/pipelines/base.yml b/.ci/pipelines/base.yml index a5b0b6e..4e7ed14 100644 --- a/.ci/pipelines/base.yml +++ b/.ci/pipelines/base.yml @@ -88,6 +88,7 @@ jobs: values: ((.:prs)) set_pipeline: dtmt-pr file: repo/.ci/pipelines/pr.yml + public: true vars: pr: ((.:pr)) gitea_api_key: ((gitea_api_key)) From bbb701176ffe1d2a54978fb77570dba7dfb354c8 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:46:05 +0000 Subject: [PATCH 53/99] fix(deps): update rust crate serde to v1.0.219 --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..4273331 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3202,18 +3202,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", From b119b0d38da4048561f6f3c84a6f1ac22a1f5888 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:46:14 +0000 Subject: [PATCH 54/99] fix(deps): update rust crate serde_json to v1.0.140 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..c81ed9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3222,9 +3222,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", From ccac8e3859f1e0d634fd5f27928882fb2fdd6e8d Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:46:21 +0000 Subject: [PATCH 55/99] fix(deps): update rust crate thiserror to v2.0.12 --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..03da545 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2218,7 +2218,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.12", "time", "tokio", "tracing", @@ -3538,11 +3538,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.6" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.6", + "thiserror-impl 2.0.12", ] [[package]] @@ -3558,9 +3558,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.6" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", From 36fba192c0a2bae82509d4ee454265b6ec806db0 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:46:46 +0000 Subject: [PATCH 56/99] fix(deps): update rust-futures monorepo to v0.3.31 --- Cargo.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..1eb170d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1234,9 +1234,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1249,9 +1249,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1259,15 +1259,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1276,15 +1276,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -1293,21 +1293,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", From bcab6e697f4c3955f96875e7270dbee5bf0b98bd Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:46:56 +0000 Subject: [PATCH 57/99] fix(deps): update tokio-tracing monorepo --- Cargo.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..65cb15a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3816,9 +3816,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -3827,9 +3827,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -3838,9 +3838,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -3848,9 +3848,9 @@ dependencies = [ [[package]] name = "tracing-error" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" dependencies = [ "tracing", "tracing-subscriber", @@ -3869,9 +3869,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", From be28b7045cdeefe7f35e17f5935d332cef52acef Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:47:03 +0000 Subject: [PATCH 58/99] chore(deps): update rust crate bitflags to v2.9.0 --- Cargo.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..fa94879 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,7 +222,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "cexpr", "clang-sys", "itertools", @@ -242,7 +242,7 @@ version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "cexpr", "clang-sys", "itertools", @@ -264,9 +264,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "bitmaps" @@ -917,7 +917,7 @@ dependencies = [ "ansi-parser", "async-recursion", "bincode", - "bitflags 2.7.0", + "bitflags 2.9.0", "clap", "color-eyre", "colors-transform", @@ -1805,7 +1805,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "inotify-sys", "libc", ] @@ -2032,7 +2032,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "libc", "redox_syscall", ] @@ -2274,7 +2274,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "filetime", "fsevent-sys", "inotify", @@ -2377,7 +2377,7 @@ version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "cfg-if", "foreign-types", "libc", @@ -2809,7 +2809,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", ] [[package]] @@ -3001,7 +3001,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", @@ -3135,7 +3135,7 @@ name = "sdk" version = "0.3.0" dependencies = [ "async-recursion", - "bitflags 2.7.0", + "bitflags 2.9.0", "byteorder", "color-eyre", "csv-async", @@ -3162,7 +3162,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "core-foundation", "core-foundation-sys", "libc", @@ -3471,7 +3471,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "core-foundation", "system-configuration-sys", ] From c2f02e7ce67fad873db7f09cf86816d4228a0fe7 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:47:13 +0000 Subject: [PATCH 59/99] chore(deps): update rust crate fastrand to v2.3.0 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..b475485 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1070,9 +1070,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fd-lock" From 3f3c4aa3210120448115bdae046e434e10d45a73 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:47:20 +0000 Subject: [PATCH 60/99] chore(deps): update rust crate minijinja to v2.9.0 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..198c53c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2140,9 +2140,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.2.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7d3e3a3eece1fa4618237ad41e1de855ced47eab705cec1c9a920e1d1c5aad" +checksum = "98642a6dfca91122779a307b77cd07a4aa951fbe32232aaf5bad9febc66be754" dependencies = [ "serde", ] From 221a6b8485508ee758bbb26b63bb0008e3ec898e Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:47:28 +0000 Subject: [PATCH 61/99] chore(deps): update rust crate tempfile to v3.19.1 --- Cargo.lock | 81 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..5d27dfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1040,12 +1040,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1081,7 +1081,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ "cfg-if", - "rustix", + "rustix 0.38.34", "windows-sys 0.48.0", ] @@ -1398,7 +1398,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -2043,6 +2055,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + [[package]] name = "lockfree-object-pool" version = "0.1.6" @@ -2181,7 +2199,7 @@ dependencies = [ "hermit-abi", "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -2766,6 +2784,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radix_trie" version = "0.2.1" @@ -2818,7 +2842,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", "thiserror 1.0.63", ] @@ -2946,7 +2970,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -3004,10 +3028,23 @@ dependencies = [ "bitflags 2.7.0", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] +[[package]] +name = "rustix" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +dependencies = [ + "bitflags 2.7.0", + "errno", + "libc", + "linux-raw-sys 0.9.4", + "windows-sys 0.59.0", +] + [[package]] name = "rustls" version = "0.23.12" @@ -3507,14 +3544,14 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ - "cfg-if", "fastrand", + "getrandom 0.3.2", "once_cell", - "rustix", + "rustix 1.0.5", "windows-sys 0.59.0", ] @@ -4190,6 +4227,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -4632,6 +4678,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.7.0", +] + [[package]] name = "xi-unicode" version = "0.3.0" From 42e2eb7cc12fbf5192c95e5c846b241580644d54 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:47:37 +0000 Subject: [PATCH 62/99] chore(deps): update rust crate tokio to v1.44.2 --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..e613ae1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3661,9 +3661,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", @@ -3679,9 +3679,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", From bdce3e7787ecef128c3ba329baaf9967673de976 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:47:48 +0000 Subject: [PATCH 63/99] chore(deps): update rust crate zip to v2.6.1 --- Cargo.lock | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..9470462 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,9 +108,9 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -324,22 +324,20 @@ checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +checksum = "49ecfb22d906f800d4fe833b6282cf4dc1c298f5057ca0b5445e5c209735ca47" dependencies = [ "bzip2-sys", - "libc", ] [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.13+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" dependencies = [ "cc", - "libc", "pkg-config", ] @@ -679,9 +677,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -726,9 +724,9 @@ checksum = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5" [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", "serde", @@ -736,9 +734,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", @@ -3579,9 +3577,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa", @@ -3596,15 +3594,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ "num-conv", "time-core", @@ -4664,19 +4662,17 @@ checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zip" -version = "2.2.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744" dependencies = [ "arbitrary", "bzip2", "crc32fast", "crossbeam-utils", - "displaydoc", "flate2", "indexmap", "memchr", - "thiserror 1.0.63", "time", "zopfli", "zstd", From be7b16c5ef2a88199b6a644313f2a01ada08402d Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 15:47:56 +0000 Subject: [PATCH 64/99] fix(deps): update rust crate regex to v1.11.1 --- Cargo.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d693ce1..e3400e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2825,14 +2825,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -2846,13 +2846,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -2863,9 +2863,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" From 1a000371faad19de32863a2e7bca270a0db6104f Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 18:41:59 +0200 Subject: [PATCH 65/99] Treat lint warnings as errors in CI Warnings will not show up if they don't fail CI. --- .ci/tasks/clippy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/tasks/clippy.sh b/.ci/tasks/clippy.sh index 33901a9..7c27b5f 100755 --- a/.ci/tasks/clippy.sh +++ b/.ci/tasks/clippy.sh @@ -10,6 +10,6 @@ title "Install clippy" rustup component add clippy title "Run clippy" -cargo clippy --color always --no-deps +cargo clippy --color always --no-deps -- -D warnings title "Done" From 9ac13834a1b1adceffdef3d1a9bcdda26b8fc121 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 18:45:18 +0200 Subject: [PATCH 66/99] Commit lock file changes Seems like Renovate missed this. --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cbc1c09..7417133 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3036,7 +3036,7 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys 0.9.4", @@ -4682,7 +4682,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.9.0", ] [[package]] From 38a023bea638c4d2d555d68f9145db7139dcc0ed Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 22:52:54 +0200 Subject: [PATCH 67/99] Move serde_sjson to its own project --- .gitmodules | 3 --- Cargo.lock | 31 +++++++++++++++++++++---------- Cargo.toml | 3 +-- lib/serde_sjson | 1 - 4 files changed, 22 insertions(+), 16 deletions(-) delete mode 160000 lib/serde_sjson diff --git a/.gitmodules b/.gitmodules index a03eebf..e1964a8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "lib/serde_sjson"] - path = lib/serde_sjson - url = https://git.sclu1034.dev/lucas/serde_sjson.git [submodule "lib/luajit2-sys"] path = lib/luajit2-sys url = https://github.com/sclu1034/luajit2-sys.git diff --git a/Cargo.lock b/Cargo.lock index 7417133..874331a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,7 +39,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43e7fd8284f025d0bd143c2855618ecdf697db55bde39211e5c9faec7669173" dependencies = [ "heapless", - "nom", + "nom 7.1.3", ] [[package]] @@ -383,7 +383,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom", + "nom 7.1.3", ] [[package]] @@ -2033,7 +2033,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2274,14 +2274,23 @@ dependencies = [ ] [[package]] -name = "nom_locate" -version = "4.2.0" +name = "nom" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e3c83c053b0713da60c5b8de47fe8e494fe3ece5267b2f23090a07a053ba8f3" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "nom_locate" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d" dependencies = [ "bytecount", "memchr", - "nom", + "nom 8.0.0", ] [[package]] @@ -3269,9 +3278,11 @@ dependencies = [ [[package]] name = "serde_sjson" -version = "1.0.0" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c5b0d7af37492e99b8559436ee76b9ec8935c75449b1c2ef08c205a9e92ae6f" dependencies = [ - "nom", + "nom 8.0.0", "nom_locate", "serde", ] @@ -4374,7 +4385,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3f00fe6..31130f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ members = [ "lib/dtmt-shared", "lib/oodle", "lib/sdk", - "lib/serde_sjson", "lib/luajit2-sys", "lib/color-eyre", ] @@ -47,7 +46,7 @@ pin-project-lite = "0.2.9" promptly = "0.3.1" sdk = { path = "lib/sdk" } serde = { version = "1.0.152", features = ["derive", "rc"] } -serde_sjson = { path = "lib/serde_sjson" } +serde_sjson = "1.2.1" steamlocate = "2.0.0-beta.2" strip-ansi-escapes = "0.2.0" time = { version = "0.3.20", features = ["serde", "serde-well-known", "local-offset", "formatting", "macros"] } diff --git a/lib/serde_sjson b/lib/serde_sjson deleted file mode 160000 index 73d2b23..0000000 --- a/lib/serde_sjson +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 73d2b23ce50e75b184f5092ad515e97a0adbe6da From 3d05a2395e005de0443afb82a8c90c434f597a83 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 23:13:36 +0200 Subject: [PATCH 68/99] Fix clippy warnings --- Cargo.toml | 2 +- crates/dtmm/src/controller/deploy.rs | 15 ++++----------- crates/dtmm/src/controller/game.rs | 6 +++--- crates/dtmm/src/controller/import.rs | 2 +- crates/dtmt/src/cmd/bundle/extract.rs | 2 +- crates/dtmt/src/shell_parse.rs | 14 ++++---------- lib/sdk/src/bundle/mod.rs | 2 +- lib/sdk/src/filetype/lua.rs | 8 ++++---- lib/sdk/src/filetype/strings.rs | 8 ++++++-- 9 files changed, 25 insertions(+), 34 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 31130f4..23e92ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ glob = "0.3.0" interprocess = "2.1.0" lazy_static = "1.4.0" luajit2-sys = { path = "lib/luajit2-sys" } -minijinja = { version = "2.0.1", default-features = false } +minijinja = { version = "2.0.1", default-features = false, features = ["serde"] } nanorand = "0.7.0" nexusmods = { path = "lib/nexusmods" } notify = "8.0.0" diff --git a/crates/dtmm/src/controller/deploy.rs b/crates/dtmm/src/controller/deploy.rs index 02b6860..481b07c 100644 --- a/crates/dtmm/src/controller/deploy.rs +++ b/crates/dtmm/src/controller/deploy.rs @@ -116,14 +116,14 @@ async fn patch_game_settings(state: Arc) -> Result<()> { eyre::bail!("couldn't find 'boot_script' field"); }; - f.write_all(settings[0..i].as_bytes()).await?; + f.write_all(&settings.as_bytes()[0..i]).await?; f.write_all(b"boot_script = \"scripts/mod_main\"").await?; let Some(j) = settings[i..].find('\n') else { eyre::bail!("couldn't find end of 'boot_script' field"); }; - f.write_all(settings[(i + j)..].as_bytes()).await?; + f.write_all(&settings.as_bytes()[(i + j)..]).await?; Ok(()) } @@ -453,10 +453,7 @@ async fn build_bundles(state: Arc) -> Result> { } #[tracing::instrument(skip_all)] -async fn patch_boot_bundle( - state: Arc, - deployment_info: &String, -) -> Result> { +async fn patch_boot_bundle(state: Arc, deployment_info: &str) -> Result> { let bundle_dir = Arc::new(state.game_dir.join("bundle")); let bundle_path = bundle_dir.join(format!("{:x}", Murmur64::hash(BOOT_BUNDLE_NAME.as_bytes()))); @@ -590,11 +587,7 @@ fn build_deployment_data( .map(|bundle| format!("{:x}", bundle.name().to_murmur64())) .collect(), // TODO: - mod_folders: mod_folders - .as_ref() - .iter() - .map(|folder| folder.clone()) - .collect(), + mod_folders: mod_folders.as_ref().to_vec(), }; serde_sjson::to_string(&info).wrap_err("Failed to serizalize deployment data") } diff --git a/crates/dtmm/src/controller/game.rs b/crates/dtmm/src/controller/game.rs index 6b91169..b93d985 100644 --- a/crates/dtmm/src/controller/game.rs +++ b/crates/dtmm/src/controller/game.rs @@ -91,14 +91,14 @@ async fn patch_game_settings(state: Arc) -> Result<()> { eyre::bail!("couldn't find 'boot_script' field"); }; - f.write_all(settings[0..i].as_bytes()).await?; + f.write_all(&settings.as_bytes()[0..i]).await?; f.write_all(b"boot_script = \"scripts/mod_main\"").await?; let Some(j) = settings[i..].find('\n') else { eyre::bail!("couldn't find end of 'boot_script' field"); }; - f.write_all(settings[(i + j)..].as_bytes()).await?; + f.write_all(&settings.as_bytes()[(i + j)..]).await?; Ok(()) } @@ -208,7 +208,7 @@ pub(crate) async fn reset_mod_deployment(state: ActionState) -> Result<()> { for p in paths { let path = bundle_dir.join(p); - let backup = bundle_dir.join(&format!("{}.bak", p)); + let backup = bundle_dir.join(format!("{}.bak", p)); let res = async { tracing::debug!( diff --git a/crates/dtmm/src/controller/import.rs b/crates/dtmm/src/controller/import.rs index 2f5f90b..6fc9693 100644 --- a/crates/dtmm/src/controller/import.rs +++ b/crates/dtmm/src/controller/import.rs @@ -397,7 +397,7 @@ fn extract_legacy_mod( tracing::trace!("Writing file '{}'", name.display()); let mut out = std::fs::OpenOptions::new() .write(true) - .create(true) + .truncate(true) .open(&name) .wrap_err_with(|| format!("Failed to open file '{}'", name.display()))?; diff --git a/crates/dtmt/src/cmd/bundle/extract.rs b/crates/dtmt/src/cmd/bundle/extract.rs index 9a0f1dd..75f1360 100644 --- a/crates/dtmt/src/cmd/bundle/extract.rs +++ b/crates/dtmt/src/cmd/bundle/extract.rs @@ -150,7 +150,7 @@ async fn parse_command_line_template(tmpl: &String) -> Result { String::from_utf8_unchecked(bytes.to_vec()) }); - while let Some(arg) = parsed.next() { + for arg in parsed.by_ref() { // Safety: See above. cmd.arg(unsafe { String::from_utf8_unchecked(arg.to_vec()) }); } diff --git a/crates/dtmt/src/shell_parse.rs b/crates/dtmt/src/shell_parse.rs index 6f35a5f..13b3c4d 100644 --- a/crates/dtmt/src/shell_parse.rs +++ b/crates/dtmt/src/shell_parse.rs @@ -54,17 +54,11 @@ impl<'a> ShellParser<'a> { } _ => {} }, - ParserState::SingleQuote => match c { - b'\'' => { - return Some(&self.bytes[start..(self.offset - 1)]); - } - _ => {} + ParserState::SingleQuote => if c == b'\'' { + return Some(&self.bytes[start..(self.offset - 1)]); }, - ParserState::DoubleQuote => match c { - b'"' => { - return Some(&self.bytes[start..(self.offset - 1)]); - } - _ => {} + ParserState::DoubleQuote => if c == b'"' { + return Some(&self.bytes[start..(self.offset - 1)]); }, } } diff --git a/lib/sdk/src/bundle/mod.rs b/lib/sdk/src/bundle/mod.rs index ca36393..075f4d2 100644 --- a/lib/sdk/src/bundle/mod.rs +++ b/lib/sdk/src/bundle/mod.rs @@ -237,7 +237,7 @@ impl Bundle { // Ceiling division (or division toward infinity) to calculate // the number of chunks required to fit the unpacked data. - let num_chunks = (unpacked_data.len() + CHUNK_SIZE - 1) / CHUNK_SIZE; + let num_chunks = unpacked_data.len().div_ceil(CHUNK_SIZE); tracing::trace!(num_chunks); w.write_u32(num_chunks as u32)?; diff --git a/lib/sdk/src/filetype/lua.rs b/lib/sdk/src/filetype/lua.rs index 14f0d6b..dd0494e 100644 --- a/lib/sdk/src/filetype/lua.rs +++ b/lib/sdk/src/filetype/lua.rs @@ -125,7 +125,7 @@ pub fn compile(name: impl Into, code: impl AsRef) -> Result, code: impl AsRef) -> Result unreachable!(), } - lua::lua_setglobal(state, b"fn\0".as_ptr() as _); + lua::lua_setglobal(state, c"fn".as_ptr()); - let run = b"return string.dump(fn, false)\0"; - match lua::luaL_loadstring(state, run.as_ptr() as _) as u32 { + let run = c"return string.dump(fn, false)"; + match lua::luaL_loadstring(state, run.as_ptr()) as u32 { lua::LUA_OK => {} lua::LUA_ERRSYNTAX => { let err = lua::lua_tostring(state, -1); diff --git a/lib/sdk/src/filetype/strings.rs b/lib/sdk/src/filetype/strings.rs index ca2ed8c..8643266 100644 --- a/lib/sdk/src/filetype/strings.rs +++ b/lib/sdk/src/filetype/strings.rs @@ -28,10 +28,14 @@ impl Language { #[derive(serde::Serialize)] pub struct Strings(HashMap>); +#[inline(always)] fn read_string(r: R) -> Result where R: Read, { + // We can safely ignore the warning here, as all data is already in memory, and no additional + // `BufReader` should be needed. + #[allow(clippy::unbuffered_bytes)] r.bytes() .take_while(|b| b.as_ref().map(|b| *b != 0).unwrap_or(false)) .map(|b| b.map_err(Report::new)) @@ -41,7 +45,7 @@ where impl Strings { #[tracing::instrument(skip_all, fields(languages = variants.len()))] - pub fn from_variants(ctx: &crate::Context, variants: &Vec) -> Result { + pub fn from_variants(ctx: &crate::Context, variants: &[BundleFileVariant]) -> Result { let mut map: HashMap> = HashMap::new(); for (i, variant) in variants.iter().enumerate() { @@ -76,7 +80,7 @@ impl Strings { } #[tracing::instrument(skip_all)] -pub fn decompile(ctx: &crate::Context, variants: &Vec) -> Result> { +pub fn decompile(ctx: &crate::Context, variants: &[BundleFileVariant]) -> Result> { let strings = Strings::from_variants(ctx, variants)?; let content = strings.to_sjson()?; From bb6396c9321291a70f90a15116edc3d229bdf5a7 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 23:15:08 +0200 Subject: [PATCH 69/99] Fix build script --- .ci/tasks/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/tasks/build.sh b/.ci/tasks/build.sh index 0b4f2aa..68c61a0 100755 --- a/.ci/tasks/build.sh +++ b/.ci/tasks/build.sh @@ -24,7 +24,7 @@ PR=${PR:-} if [ -n "$PR" ]; then title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')" ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')" -elif [ -f ".git/branch"]; then +elif [ -f ".git/branch" ]; then ref=$(cat .git/branch)-$(git rev-parse --short $ref) else ref=$(git rev-parse --short "$(cat .git/ref || echo "HEAD")") From bf5c21dd03fb9e9ed74b1609399feb41ff05da12 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 21:46:09 +0000 Subject: [PATCH 70/99] chore(deps): update rust crate steamlocate to v2.0.1 --- Cargo.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 874331a..f4ff703 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -768,15 +768,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1641,6 +1632,15 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "http" version = "1.1.0" @@ -3413,12 +3413,12 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "steamlocate" -version = "2.0.0-beta.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b6a4810c4e7fecb0123a9a8ba99b335c17d92e636c265ef99108ee4734c812" +checksum = "a13160bc6ea5cd80cde195ad4a4c629701db2bf397b62c139aa9e739016d2499" dependencies = [ "crc", - "dirs", + "home", "keyvalues-parser", "keyvalues-serde", "serde", @@ -4661,12 +4661,12 @@ dependencies = [ [[package]] name = "winreg" -version = "0.51.0" +version = "0.55.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] From 6e58449dac11edf43770971e3f5907e1d4623310 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 21:46:13 +0000 Subject: [PATCH 71/99] fix(deps): update rust crate url to v2.5.4 --- Cargo.lock | 276 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 245 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 874331a..a788e09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1755,13 +1755,142 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.5.0" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2059,6 +2188,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" + [[package]] name = "lockfree-object-pool" version = "0.1.6" @@ -3511,6 +3646,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "system-configuration" version = "0.6.0" @@ -3688,23 +3834,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.44.2" @@ -4083,15 +4215,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-script" version = "0.5.6" @@ -4130,9 +4253,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -4166,12 +4289,24 @@ dependencies = [ "xmlwriter", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf16_lit" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14706d2a800ee8ff38c1d3edb873cd616971ea59eb7c0d046bb44ef59b06a1ae" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -4696,6 +4831,18 @@ dependencies = [ "bitflags 2.9.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xi-unicode" version = "0.3.0" @@ -4720,12 +4867,79 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "zip" version = "2.6.1" From 83de50409b9a31822508c4fe2b947f8d5443dcd9 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 21 Apr 2025 23:55:55 +0200 Subject: [PATCH 72/99] Fix locating Steam game path --- lib/dtmt-shared/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dtmt-shared/src/lib.rs b/lib/dtmt-shared/src/lib.rs index d1f69c7..db11579 100644 --- a/lib/dtmt-shared/src/lib.rs +++ b/lib/dtmt-shared/src/lib.rs @@ -87,7 +87,7 @@ pub fn collect_game_info() -> Result> { .find_app(STEAMAPP_ID) .wrap_err("Failed to look up game by Steam app ID")?; - let Some((app, _)) = found else { + let Some((app, library)) = found else { return Ok(None); }; @@ -96,7 +96,7 @@ pub fn collect_game_info() -> Result> { .ok_or_eyre("Missing field 'last_updated'")?; Ok(Some(GameInfo { - path: app.install_dir.into(), + path: library.path().join(app.install_dir), last_updated: last_updated.into(), })) } From ddc69112bc4f1985f06e8768eb04cd1ec2e22bf3 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 22:01:08 +0000 Subject: [PATCH 73/99] chore(deps): update rust crate cli-table to 0.5.0 --- Cargo.lock | 70 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 2 +- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a788e09..c69417f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,7 +141,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -233,7 +233,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -253,7 +253,7 @@ dependencies = [ "regex", "rustc-hash 2.1.0", "shlex", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -446,7 +446,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -457,24 +457,24 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "cli-table" -version = "0.4.9" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b53f9241f288a7b12c56565f04aaeaeeab6b8923d42d99255d4ca428b4d97f89" +checksum = "14da8d951cef7cc4f13ccc9b744d736963d57863c7e6fc33c070ea274546082c" dependencies = [ "cli-table-derive", "termcolor", - "unicode-width 0.1.13", + "unicode-width 0.2.0", ] [[package]] name = "cli-table-derive" -version = "0.4.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e83a93253aaae7c74eb7428ce4faa6e219ba94886908048888701819f82fb94" +checksum = "9f7c1b60bae2c3d45228dfb096046aa51ef6c300de70b658d7a13fcb0c4f832e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.100", ] [[package]] @@ -740,7 +740,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -818,7 +818,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -1286,7 +1286,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -1869,7 +1869,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -2554,7 +2554,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -2701,7 +2701,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -2862,7 +2862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -2901,9 +2901,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -2919,9 +2919,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -3396,7 +3396,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -3628,9 +3628,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -3654,7 +3654,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -3745,7 +3745,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -3756,7 +3756,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -3863,7 +3863,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -4011,7 +4011,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -4402,7 +4402,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", "wasm-bindgen-shared", ] @@ -4436,7 +4436,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4473,7 +4473,7 @@ checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] @@ -4887,7 +4887,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", "synstructure", ] @@ -4908,7 +4908,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", "synstructure", ] @@ -4937,7 +4937,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.100", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 23e92ef..b5fd830 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ bincode = "1.3.3" bitflags = "2.5.0" byteorder = "1.4.3" clap = { version = "4.0.15", features = ["color", "derive", "std", "cargo", "string", "unicode"] } -cli-table = { version = "0.4.7", default-features = false, features = ["derive"] } +cli-table = { version = "0.5.0", default-features = false, features = ["derive"] } color-eyre = { path = "lib/color-eyre" } colors-transform = "0.2.11" confy = "0.6.1" From afb5bc07954386e1c3bd0a8f2777cffd387220bb Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 21 Apr 2025 22:01:13 +0000 Subject: [PATCH 74/99] chore(deps): update rust crate bincode to v2 --- Cargo.lock | 27 +++++++++++++++++++++++++-- Cargo.toml | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a788e09..358c5a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -209,11 +209,22 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bincode" -version = "1.3.3" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" dependencies = [ + "bincode_derive", "serde", + "unty", +] + +[[package]] +name = "bincode_derive" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +dependencies = [ + "virtue", ] [[package]] @@ -4251,6 +4262,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + [[package]] name = "url" version = "2.5.4" @@ -4337,6 +4354,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "virtue" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" + [[package]] name = "vte" version = "0.14.1" diff --git a/Cargo.toml b/Cargo.toml index 23e92ef..a4667fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ exclude = ["lib/color-eyre"] ansi-parser = "0.9.1" ansi_term = "0.12.1" async-recursion = "1.0.5" -bincode = "1.3.3" +bincode = "2.0.0" bitflags = "2.5.0" byteorder = "1.4.3" clap = { version = "4.0.15", features = ["color", "derive", "std", "cargo", "string", "unicode"] } From 72ab8811c34502fbcfd34db76dd253fd798ef119 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 22 Apr 2025 00:05:29 +0200 Subject: [PATCH 75/99] Ignore broken pipe error when printing dictionary stdout closing prematurely is normal behaviour, e.g. piping into `head`. --- crates/dtmt/src/cmd/dictionary.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/dtmt/src/cmd/dictionary.rs b/crates/dtmt/src/cmd/dictionary.rs index 62a5295..4c54c34 100644 --- a/crates/dtmt/src/cmd/dictionary.rs +++ b/crates/dtmt/src/cmd/dictionary.rs @@ -227,9 +227,12 @@ pub(crate) async fn run(mut ctx: sdk::Context, matches: &ArgMatches) -> Result<( let lookup = &ctx.lookup; let rows: Vec<_> = lookup.entries().iter().map(TableRow::from).collect(); - print_stdout(rows.with_title())?; - - Ok(()) + match print_stdout(rows.with_title()) { + Ok(_) => Ok(()), + // Closing stdout prematurely is normal behavior with things like piping into `head` + Err(err) if err.kind() == std::io::ErrorKind::BrokenPipe => Ok(()), + Err(err) => Err(err.into()), + } } _ => unreachable!( "clap is configured to require a subcommand, and they're all handled above" From cd4a953a63785cc9bd22fdc549bff11ea02b804c Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 22 Apr 2025 00:14:43 +0200 Subject: [PATCH 76/99] Update bincode --- crates/dtmm/src/main.rs | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/crates/dtmm/src/main.rs b/crates/dtmm/src/main.rs index 6c0bb48..54e101a 100644 --- a/crates/dtmm/src/main.rs +++ b/crates/dtmm/src/main.rs @@ -52,10 +52,14 @@ fn notify_nxm_download( tracing::debug!("Connected to main process at '{}'", IPC_ADDRESS); - bincode::serialize_into(&mut stream, uri.as_ref()).wrap_err("Failed to send URI")?; + let bincode_config = bincode::config::standard(); + + bincode::encode_into_std_write(uri.as_ref(), &mut stream, bincode_config) + .wrap_err("Failed to send URI")?; // We don't really care what the message is, we just need an acknowledgement. - let _: String = bincode::deserialize_from(&mut stream).wrap_err("Failed to receive reply")?; + let _: String = bincode::decode_from_std_read(&mut stream, bincode_config) + .wrap_err("Failed to receive reply")?; tracing::info!( "Notified DTMM with uri '{}'. Check the main window.", @@ -160,22 +164,33 @@ fn main() -> Result<()> { match res { Ok(mut stream) => { - let res = bincode::deserialize_from(&mut stream) - .wrap_err("Failed to read message") - .and_then(|uri: String| { - tracing::trace!(uri, "Received NXM uri"); + let res = bincode::decode_from_std_read( + &mut stream, + bincode::config::standard(), + ) + .wrap_err("Failed to read message") + .and_then(|uri: String| { + tracing::trace!(uri, "Received NXM uri"); - event_sink - .submit_command(ACTION_HANDLE_NXM, uri, druid::Target::Auto) - .wrap_err("Failed to start NXM download") - }); + event_sink + .submit_command(ACTION_HANDLE_NXM, uri, druid::Target::Auto) + .wrap_err("Failed to start NXM download") + }); match res { Ok(()) => { - let _ = bincode::serialize_into(&mut stream, "Ok"); + let _ = bincode::encode_into_std_write( + "Ok", + &mut stream, + bincode::config::standard(), + ); } Err(err) => { tracing::error!("{:?}", err); - let _ = bincode::serialize_into(&mut stream, "Error"); + let _ = bincode::encode_into_std_write( + "Error", + &mut stream, + bincode::config::standard(), + ); } } } From 5bb0f2acf561edca6e358d934c79c9d0a8c9cb44 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 22 Apr 2025 14:50:37 +0200 Subject: [PATCH 77/99] Fix build script --- .ci/tasks/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.ci/tasks/build.sh b/.ci/tasks/build.sh index 68c61a0..b362266 100755 --- a/.ci/tasks/build.sh +++ b/.ci/tasks/build.sh @@ -20,14 +20,15 @@ install_artifact() { cd "repo" PR=${PR:-} +ref=$(cat .git/ref || echo "HEAD") if [ -n "$PR" ]; then title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')" - ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')" + ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$ref" 2>/dev/null || echo 'manual')" elif [ -f ".git/branch" ]; then - ref=$(cat .git/branch)-$(git rev-parse --short $ref) + ref=$(cat .git/branch)-$(git rev-parse --short "$ref") else - ref=$(git rev-parse --short "$(cat .git/ref || echo "HEAD")") + ref=$(git rev-parse --short "$ref") fi title "Version: '$ref'" From 43e3bf7b60de613258f4da7fc116bebaefc9c1f1 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 26 Jul 2024 16:03:04 +0200 Subject: [PATCH 78/99] Add cmdline to tracing output Can come in handy when other people report problems and show the error message or full log, but not the command line. Setting that span to `level = "error"` ensures that it won't be disabled by level filters. --- crates/dtmt/src/main.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/dtmt/src/main.rs b/crates/dtmt/src/main.rs index 2e10b17..e41e802 100644 --- a/crates/dtmt/src/main.rs +++ b/crates/dtmt/src/main.rs @@ -36,10 +36,21 @@ struct GlobalConfig { } #[tokio::main] -#[tracing::instrument] +#[tracing::instrument(level = "error", fields(cmd_line = tracing::field::Empty))] async fn main() -> Result<()> { color_eyre::install()?; + { + let span = tracing::Span::current(); + if !span.is_disabled() { + let cmdline: String = std::env::args_os().fold(String::new(), |mut s, arg| { + s.push_str(&arg.to_string_lossy()); + s + }); + span.record("cmd_line", cmdline); + } + } + let matches = command!() .subcommand_required(true) .arg( From 636279edfe376bd9d748347c7195d4e82af90015 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 21 Feb 2025 14:51:42 +0100 Subject: [PATCH 79/99] Use macro to generate file type enum and impls Due to the large amount of variants, and the different kind of values connected to each variant (hash, extension name) being scattered across the various `impl` blocks, the file became rather convoluted. While I don't generally like the indirection of macros or meta programming, it's not that bad with Rust, thanks to Rust Analyzer being able to attach diagnostics to the source inside the macro definition, and the ability to generate the macro's output for validation. Therefore, the new macro allows putting all data used for this enum definition into a single block. --- lib/sdk/src/bundle/filetype.rs | 490 +++++++++------------------------ 1 file changed, 132 insertions(+), 358 deletions(-) diff --git a/lib/sdk/src/bundle/filetype.rs b/lib/sdk/src/bundle/filetype.rs index 0b4f292..68ff6b5 100644 --- a/lib/sdk/src/bundle/filetype.rs +++ b/lib/sdk/src/bundle/filetype.rs @@ -3,232 +3,147 @@ use serde::Serialize; use crate::murmur::Murmur64; -#[derive(Debug, Hash, PartialEq, Eq, Copy, Clone)] -pub enum BundleFileType { - Animation, - AnimationCurves, - Apb, - BakedLighting, - Bik, - BlendSet, - Bones, - Chroma, - CommonPackage, - Config, - Crypto, - Data, - Entity, - Flow, - Font, - Ies, - Ini, - Input, - Ivf, - Keys, - Level, - Lua, - Material, - Mod, - MouseCursor, - NavData, - NetworkConfig, - OddleNet, - Package, - Particles, - PhysicsProperties, - RenderConfig, - RtPipeline, - Scene, - Shader, - ShaderLibrary, - ShaderLibraryGroup, - ShadingEnvionmentMapping, - ShadingEnvironment, - Slug, - SlugAlbum, - SoundEnvironment, - SpuJob, - StateMachine, - StaticPVS, - Strings, - SurfaceProperties, - Texture, - TimpaniBank, - TimpaniMaster, - Tome, - Ugg, - Unit, - Upb, - VectorField, - Wav, - WwiseBank, - WwiseDep, - WwiseEvent, - WwiseMetadata, - WwiseStream, - Xml, +macro_rules! make_enum { + ( + $( $variant:ident, $hash:expr, $ext:expr $(, $decompiled:expr)? ; )+ + ) => { + #[derive(Debug, Hash, PartialEq, Eq, Copy, Clone)] + pub enum BundleFileType { + $( + $variant, + )+ + Unknown(Murmur64), + } - Unknown(Murmur64), + impl BundleFileType { + pub fn ext_name(&self) -> String { + match self { + $( + Self::$variant => String::from($ext), + )+ + Self::Unknown(s) => format!("{s:016X}"), + } + } + + pub fn decompiled_ext_name(&self) -> String { + match self { + $( + $( Self::$variant => String::from($decompiled), )? + )+ + _ => self.ext_name(), + } + } + } + + impl std::str::FromStr for BundleFileType { + type Err = color_eyre::Report; + fn from_str(s: &str) -> Result { + match s { + $( + $ext => Ok(Self::$variant), + )+ + s => eyre::bail!("Unknown type string '{}'", s), + } + } + } + + impl From for BundleFileType { + fn from(h: u64) -> Self { + match h { + $( + $hash => Self::$variant, + )+ + hash => Self::Unknown(hash.into()), + } + } + } + + impl From for u64 { + fn from(t: BundleFileType) -> u64 { + match t { + $( + BundleFileType::$variant => $hash, + )+ + BundleFileType::Unknown(hash) => hash.into(), + } + } + } + } +} + +make_enum! { + AnimationCurves, 0xdcfb9e18fff13984, "animation_curves"; + Animation, 0x931e336d7646cc26, "animation"; + Apb, 0x3eed05ba83af5090, "apb"; + BakedLighting, 0x7ffdb779b04e4ed1, "baked_lighting"; + Bik, 0xaa5965f03029fa18, "bik"; + BlendSet, 0xe301e8af94e3b5a3, "blend_set"; + Bones, 0x18dead01056b72e9, "bones"; + Chroma, 0xb7893adf7567506a, "chroma"; + CommonPackage, 0xfe9754bd19814a47, "common_package"; + Config, 0x82645835e6b73232, "config"; + Crypto, 0x69108ded1e3e634b, "crypto"; + Data, 0x8fd0d44d20650b68, "data"; + Entity, 0x9831ca893b0d087d, "entity"; + Flow, 0x92d3ee038eeb610d, "flow"; + Font, 0x9efe0a916aae7880, "font"; + Ies, 0x8f7d5a2c0f967655, "ies"; + Ini, 0xd526a27da14f1dc5, "ini"; + Input, 0x2bbcabe5074ade9e, "input"; + Ivf, 0xfa4a8e091a91201e, "ivf"; + Keys, 0xa62f9297dc969e85, "keys"; + Level, 0x2a690fd348fe9ac5, "level"; + Lua, 0xa14e8dfa2cd117e2, "lua"; + Material, 0xeac0b497876adedf, "material"; + Mod, 0x3fcdd69156a46417, "mod"; + MouseCursor, 0xb277b11fe4a61d37, "mouse_cursor"; + NavData, 0x169de9566953d264, "nav_data"; + NetworkConfig, 0x3b1fa9e8f6bac374, "network_config"; + OddleNet, 0xb0f2c12eb107f4d8, "oodle_net"; + Package, 0xad9c6d9ed1e5e77a, "package"; + Particles, 0xa8193123526fad64, "particles"; + PhysicsProperties, 0xbf21403a3ab0bbb1, "physics_properties"; + RenderConfig, 0x27862fe24795319c, "render_config"; + RtPipeline, 0x9ca183c2d0e76dee, "rt_pipeline"; + Scene, 0x9d0a795bfe818d19, "scene"; + Shader, 0xcce8d5b5f5ae333f, "shader"; + ShaderLibrary, 0xe5ee32a477239a93, "shader_library"; + ShaderLibraryGroup, 0x9e5c3cc74575aeb5, "shader_library_group"; + ShadingEnvionmentMapping, 0x250e0a11ac8e26f8, "shading_envionment_mapping"; + ShadingEnvironment, 0xfe73c7dcff8a7ca5, "shading_environment"; + Slug, 0xa27b4d04a9ba6f9e, "slug"; + SlugAlbum, 0xe9fc9ea7042e5ec0, "slug_album"; + SoundEnvironment, 0xd8b27864a97ffdd7, "sound_environment"; + SpuJob, 0xf97af9983c05b950, "spu_job"; + StateMachine, 0xa486d4045106165c, "state_machine"; + StaticPVS, 0xe3f0baa17d620321, "static_pvs"; + Strings, 0x0d972bab10b40fd3, "strings"; + SurfaceProperties, 0xad2d3fa30d9ab394, "surface_properties"; + Texture, 0xcd4238c6a0c69e32, "texture", "dds"; + TimpaniBank, 0x99736be1fff739a4, "timpani_bank"; + TimpaniMaster, 0x00a3e6c59a2b9c6c, "timpani_master"; + Tome, 0x19c792357c99f49b, "tome"; + Ugg, 0x712d6e3dd1024c9c, "ugg"; + Unit, 0xe0a48d0be9a7453f, "unit"; + Upb, 0xa99510c6e86dd3c2, "upb"; + VectorField, 0xf7505933166d6755, "vector_field"; + Wav, 0x786f65c00a816b19, "wav"; + WwiseBank, 0x535a7bd3e650d799, "wwise_bank", "bnk"; + WwiseDep, 0xaf32095c82f2b070, "wwise_dep"; + WwiseEvent, 0xaabdd317b58dfc8a, "wwise_event"; + WwiseMetadata, 0xd50a8b7e1c82b110, "wwise_metadata"; + WwiseStream, 0x504b55235d21440e, "wwise_stream", "ogg"; + Xml, 0x76015845a6003765, "xml"; + Theme, 0x38BB9442048A7FBD, "theme"; + MissionThemes, 0x80F2DE893657F83A, "mission_themes"; } impl BundleFileType { - pub fn ext_name(&self) -> String { - match self { - BundleFileType::AnimationCurves => String::from("animation_curves"), - BundleFileType::Animation => String::from("animation"), - BundleFileType::Apb => String::from("apb"), - BundleFileType::BakedLighting => String::from("baked_lighting"), - BundleFileType::Bik => String::from("bik"), - BundleFileType::BlendSet => String::from("blend_set"), - BundleFileType::Bones => String::from("bones"), - BundleFileType::Chroma => String::from("chroma"), - BundleFileType::CommonPackage => String::from("common_package"), - BundleFileType::Config => String::from("config"), - BundleFileType::Crypto => String::from("crypto"), - BundleFileType::Data => String::from("data"), - BundleFileType::Entity => String::from("entity"), - BundleFileType::Flow => String::from("flow"), - BundleFileType::Font => String::from("font"), - BundleFileType::Ies => String::from("ies"), - BundleFileType::Ini => String::from("ini"), - BundleFileType::Input => String::from("input"), - BundleFileType::Ivf => String::from("ivf"), - BundleFileType::Keys => String::from("keys"), - BundleFileType::Level => String::from("level"), - BundleFileType::Lua => String::from("lua"), - BundleFileType::Material => String::from("material"), - BundleFileType::Mod => String::from("mod"), - BundleFileType::MouseCursor => String::from("mouse_cursor"), - BundleFileType::NavData => String::from("nav_data"), - BundleFileType::NetworkConfig => String::from("network_config"), - BundleFileType::OddleNet => String::from("oodle_net"), - BundleFileType::Package => String::from("package"), - BundleFileType::Particles => String::from("particles"), - BundleFileType::PhysicsProperties => String::from("physics_properties"), - BundleFileType::RenderConfig => String::from("render_config"), - BundleFileType::RtPipeline => String::from("rt_pipeline"), - BundleFileType::Scene => String::from("scene"), - BundleFileType::ShaderLibraryGroup => String::from("shader_library_group"), - BundleFileType::ShaderLibrary => String::from("shader_library"), - BundleFileType::Shader => String::from("shader"), - BundleFileType::ShadingEnvionmentMapping => String::from("shading_environment_mapping"), - BundleFileType::ShadingEnvironment => String::from("shading_environment"), - BundleFileType::SlugAlbum => String::from("slug_album"), - BundleFileType::Slug => String::from("slug"), - BundleFileType::SoundEnvironment => String::from("sound_environment"), - BundleFileType::SpuJob => String::from("spu_job"), - BundleFileType::StateMachine => String::from("state_machine"), - BundleFileType::StaticPVS => String::from("static_pvs"), - BundleFileType::Strings => String::from("strings"), - BundleFileType::SurfaceProperties => String::from("surface_properties"), - BundleFileType::Texture => String::from("texture"), - BundleFileType::TimpaniBank => String::from("timpani_bank"), - BundleFileType::TimpaniMaster => String::from("timpani_master"), - BundleFileType::Tome => String::from("tome"), - BundleFileType::Ugg => String::from("ugg"), - BundleFileType::Unit => String::from("unit"), - BundleFileType::Upb => String::from("upb"), - BundleFileType::VectorField => String::from("vector_field"), - BundleFileType::Wav => String::from("wav"), - BundleFileType::WwiseBank => String::from("wwise_bank"), - BundleFileType::WwiseDep => String::from("wwise_dep"), - BundleFileType::WwiseEvent => String::from("wwise_event"), - BundleFileType::WwiseMetadata => String::from("wwise_metadata"), - BundleFileType::WwiseStream => String::from("wwise_stream"), - BundleFileType::Xml => String::from("xml"), - - BundleFileType::Unknown(s) => format!("{s:016X}"), - } - } - - pub fn decompiled_ext_name(&self) -> String { - match self { - BundleFileType::Texture => String::from("dds"), - BundleFileType::WwiseBank => String::from("bnk"), - BundleFileType::WwiseStream => String::from("ogg"), - _ => self.ext_name(), - } - } - pub fn hash(&self) -> Murmur64 { Murmur64::from(*self) } } -impl std::str::FromStr for BundleFileType { - type Err = color_eyre::Report; - - fn from_str(s: &str) -> Result { - let val = match s { - "animation_curves" => BundleFileType::AnimationCurves, - "animation" => BundleFileType::Animation, - "apb" => BundleFileType::Apb, - "baked_lighting" => BundleFileType::BakedLighting, - "bik" => BundleFileType::Bik, - "blend_set" => BundleFileType::BlendSet, - "bones" => BundleFileType::Bones, - "chroma" => BundleFileType::Chroma, - "common_package" => BundleFileType::CommonPackage, - "config" => BundleFileType::Config, - "crypto" => BundleFileType::Crypto, - "data" => BundleFileType::Data, - "entity" => BundleFileType::Entity, - "flow" => BundleFileType::Flow, - "font" => BundleFileType::Font, - "ies" => BundleFileType::Ies, - "ini" => BundleFileType::Ini, - "input" => BundleFileType::Input, - "ivf" => BundleFileType::Ivf, - "keys" => BundleFileType::Keys, - "level" => BundleFileType::Level, - "lua" => BundleFileType::Lua, - "material" => BundleFileType::Material, - "mod" => BundleFileType::Mod, - "mouse_cursor" => BundleFileType::MouseCursor, - "nav_data" => BundleFileType::NavData, - "network_config" => BundleFileType::NetworkConfig, - "oodle_net" => BundleFileType::OddleNet, - "package" => BundleFileType::Package, - "particles" => BundleFileType::Particles, - "physics_properties" => BundleFileType::PhysicsProperties, - "render_config" => BundleFileType::RenderConfig, - "rt_pipeline" => BundleFileType::RtPipeline, - "scene" => BundleFileType::Scene, - "shader_library_group" => BundleFileType::ShaderLibraryGroup, - "shader_library" => BundleFileType::ShaderLibrary, - "shader" => BundleFileType::Shader, - "shading_environment_mapping" => BundleFileType::ShadingEnvionmentMapping, - "shading_environment" => BundleFileType::ShadingEnvironment, - "slug_album" => BundleFileType::SlugAlbum, - "slug" => BundleFileType::Slug, - "sound_environment" => BundleFileType::SoundEnvironment, - "spu_job" => BundleFileType::SpuJob, - "state_machine" => BundleFileType::StateMachine, - "static_pvs" => BundleFileType::StaticPVS, - "strings" => BundleFileType::Strings, - "surface_properties" => BundleFileType::SurfaceProperties, - "texture" => BundleFileType::Texture, - "timpani_bank" => BundleFileType::TimpaniBank, - "timpani_master" => BundleFileType::TimpaniMaster, - "tome" => BundleFileType::Tome, - "ugg" => BundleFileType::Ugg, - "unit" => BundleFileType::Unit, - "upb" => BundleFileType::Upb, - "vector_field" => BundleFileType::VectorField, - "wav" => BundleFileType::Wav, - "wwise_bank" => BundleFileType::WwiseBank, - "wwise_dep" => BundleFileType::WwiseDep, - "wwise_event" => BundleFileType::WwiseEvent, - "wwise_metadata" => BundleFileType::WwiseMetadata, - "wwise_stream" => BundleFileType::WwiseStream, - "xml" => BundleFileType::Xml, - s => eyre::bail!("Unknown type string '{}'", s), - }; - - Ok(val) - } -} - impl Serialize for BundleFileType { fn serialize(&self, serializer: S) -> Result where @@ -245,147 +160,6 @@ impl From for BundleFileType { } } -impl From for BundleFileType { - fn from(hash: u64) -> BundleFileType { - match hash { - 0x931e336d7646cc26 => BundleFileType::Animation, - 0xdcfb9e18fff13984 => BundleFileType::AnimationCurves, - 0x3eed05ba83af5090 => BundleFileType::Apb, - 0x7ffdb779b04e4ed1 => BundleFileType::BakedLighting, - 0xaa5965f03029fa18 => BundleFileType::Bik, - 0xe301e8af94e3b5a3 => BundleFileType::BlendSet, - 0x18dead01056b72e9 => BundleFileType::Bones, - 0xb7893adf7567506a => BundleFileType::Chroma, - 0xfe9754bd19814a47 => BundleFileType::CommonPackage, - 0x82645835e6b73232 => BundleFileType::Config, - 0x69108ded1e3e634b => BundleFileType::Crypto, - 0x8fd0d44d20650b68 => BundleFileType::Data, - 0x9831ca893b0d087d => BundleFileType::Entity, - 0x92d3ee038eeb610d => BundleFileType::Flow, - 0x9efe0a916aae7880 => BundleFileType::Font, - 0x8f7d5a2c0f967655 => BundleFileType::Ies, - 0xd526a27da14f1dc5 => BundleFileType::Ini, - 0x2bbcabe5074ade9e => BundleFileType::Input, - 0xfa4a8e091a91201e => BundleFileType::Ivf, - 0xa62f9297dc969e85 => BundleFileType::Keys, - 0x2a690fd348fe9ac5 => BundleFileType::Level, - 0xa14e8dfa2cd117e2 => BundleFileType::Lua, - 0xeac0b497876adedf => BundleFileType::Material, - 0x3fcdd69156a46417 => BundleFileType::Mod, - 0xb277b11fe4a61d37 => BundleFileType::MouseCursor, - 0x169de9566953d264 => BundleFileType::NavData, - 0x3b1fa9e8f6bac374 => BundleFileType::NetworkConfig, - 0xb0f2c12eb107f4d8 => BundleFileType::OddleNet, - 0xad9c6d9ed1e5e77a => BundleFileType::Package, - 0xa8193123526fad64 => BundleFileType::Particles, - 0xbf21403a3ab0bbb1 => BundleFileType::PhysicsProperties, - 0x27862fe24795319c => BundleFileType::RenderConfig, - 0x9ca183c2d0e76dee => BundleFileType::RtPipeline, - 0x9d0a795bfe818d19 => BundleFileType::Scene, - 0xcce8d5b5f5ae333f => BundleFileType::Shader, - 0xe5ee32a477239a93 => BundleFileType::ShaderLibrary, - 0x9e5c3cc74575aeb5 => BundleFileType::ShaderLibraryGroup, - 0x250e0a11ac8e26f8 => BundleFileType::ShadingEnvionmentMapping, - 0xfe73c7dcff8a7ca5 => BundleFileType::ShadingEnvironment, - 0xa27b4d04a9ba6f9e => BundleFileType::Slug, - 0xe9fc9ea7042e5ec0 => BundleFileType::SlugAlbum, - 0xd8b27864a97ffdd7 => BundleFileType::SoundEnvironment, - 0xf97af9983c05b950 => BundleFileType::SpuJob, - 0xa486d4045106165c => BundleFileType::StateMachine, - 0xe3f0baa17d620321 => BundleFileType::StaticPVS, - 0x0d972bab10b40fd3 => BundleFileType::Strings, - 0xad2d3fa30d9ab394 => BundleFileType::SurfaceProperties, - 0xcd4238c6a0c69e32 => BundleFileType::Texture, - 0x99736be1fff739a4 => BundleFileType::TimpaniBank, - 0x00a3e6c59a2b9c6c => BundleFileType::TimpaniMaster, - 0x19c792357c99f49b => BundleFileType::Tome, - 0x712d6e3dd1024c9c => BundleFileType::Ugg, - 0xe0a48d0be9a7453f => BundleFileType::Unit, - 0xa99510c6e86dd3c2 => BundleFileType::Upb, - 0xf7505933166d6755 => BundleFileType::VectorField, - 0x786f65c00a816b19 => BundleFileType::Wav, - 0x535a7bd3e650d799 => BundleFileType::WwiseBank, - 0xaf32095c82f2b070 => BundleFileType::WwiseDep, - 0xaabdd317b58dfc8a => BundleFileType::WwiseEvent, - 0xd50a8b7e1c82b110 => BundleFileType::WwiseMetadata, - 0x504b55235d21440e => BundleFileType::WwiseStream, - 0x76015845a6003765 => BundleFileType::Xml, - - _ => BundleFileType::Unknown(Murmur64::from(hash)), - } - } -} - -impl From for u64 { - fn from(t: BundleFileType) -> u64 { - match t { - BundleFileType::Animation => 0x931e336d7646cc26, - BundleFileType::AnimationCurves => 0xdcfb9e18fff13984, - BundleFileType::Apb => 0x3eed05ba83af5090, - BundleFileType::BakedLighting => 0x7ffdb779b04e4ed1, - BundleFileType::Bik => 0xaa5965f03029fa18, - BundleFileType::BlendSet => 0xe301e8af94e3b5a3, - BundleFileType::Bones => 0x18dead01056b72e9, - BundleFileType::Chroma => 0xb7893adf7567506a, - BundleFileType::CommonPackage => 0xfe9754bd19814a47, - BundleFileType::Config => 0x82645835e6b73232, - BundleFileType::Crypto => 0x69108ded1e3e634b, - BundleFileType::Data => 0x8fd0d44d20650b68, - BundleFileType::Entity => 0x9831ca893b0d087d, - BundleFileType::Flow => 0x92d3ee038eeb610d, - BundleFileType::Font => 0x9efe0a916aae7880, - BundleFileType::Ies => 0x8f7d5a2c0f967655, - BundleFileType::Ini => 0xd526a27da14f1dc5, - BundleFileType::Input => 0x2bbcabe5074ade9e, - BundleFileType::Ivf => 0xfa4a8e091a91201e, - BundleFileType::Keys => 0xa62f9297dc969e85, - BundleFileType::Level => 0x2a690fd348fe9ac5, - BundleFileType::Lua => 0xa14e8dfa2cd117e2, - BundleFileType::Material => 0xeac0b497876adedf, - BundleFileType::Mod => 0x3fcdd69156a46417, - BundleFileType::MouseCursor => 0xb277b11fe4a61d37, - BundleFileType::NavData => 0x169de9566953d264, - BundleFileType::NetworkConfig => 0x3b1fa9e8f6bac374, - BundleFileType::OddleNet => 0xb0f2c12eb107f4d8, - BundleFileType::Package => 0xad9c6d9ed1e5e77a, - BundleFileType::Particles => 0xa8193123526fad64, - BundleFileType::PhysicsProperties => 0xbf21403a3ab0bbb1, - BundleFileType::RenderConfig => 0x27862fe24795319c, - BundleFileType::RtPipeline => 0x9ca183c2d0e76dee, - BundleFileType::Scene => 0x9d0a795bfe818d19, - BundleFileType::Shader => 0xcce8d5b5f5ae333f, - BundleFileType::ShaderLibrary => 0xe5ee32a477239a93, - BundleFileType::ShaderLibraryGroup => 0x9e5c3cc74575aeb5, - BundleFileType::ShadingEnvionmentMapping => 0x250e0a11ac8e26f8, - BundleFileType::ShadingEnvironment => 0xfe73c7dcff8a7ca5, - BundleFileType::Slug => 0xa27b4d04a9ba6f9e, - BundleFileType::SlugAlbum => 0xe9fc9ea7042e5ec0, - BundleFileType::SoundEnvironment => 0xd8b27864a97ffdd7, - BundleFileType::SpuJob => 0xf97af9983c05b950, - BundleFileType::StateMachine => 0xa486d4045106165c, - BundleFileType::StaticPVS => 0xe3f0baa17d620321, - BundleFileType::Strings => 0x0d972bab10b40fd3, - BundleFileType::SurfaceProperties => 0xad2d3fa30d9ab394, - BundleFileType::Texture => 0xcd4238c6a0c69e32, - BundleFileType::TimpaniBank => 0x99736be1fff739a4, - BundleFileType::TimpaniMaster => 0x00a3e6c59a2b9c6c, - BundleFileType::Tome => 0x19c792357c99f49b, - BundleFileType::Ugg => 0x712d6e3dd1024c9c, - BundleFileType::Unit => 0xe0a48d0be9a7453f, - BundleFileType::Upb => 0xa99510c6e86dd3c2, - BundleFileType::VectorField => 0xf7505933166d6755, - BundleFileType::Wav => 0x786f65c00a816b19, - BundleFileType::WwiseBank => 0x535a7bd3e650d799, - BundleFileType::WwiseDep => 0xaf32095c82f2b070, - BundleFileType::WwiseEvent => 0xaabdd317b58dfc8a, - BundleFileType::WwiseMetadata => 0xd50a8b7e1c82b110, - BundleFileType::WwiseStream => 0x504b55235d21440e, - BundleFileType::Xml => 0x76015845a6003765, - - BundleFileType::Unknown(hash) => hash.into(), - } - } -} impl From for Murmur64 { fn from(t: BundleFileType) -> Murmur64 { let hash: u64 = t.into(); From 7b95918000430088139af81b9aea2d540e25f98b Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 22 Sep 2023 15:42:16 +0200 Subject: [PATCH 80/99] Refactor code for file injection I ended up wrapping the raw data in a `BundleFile` twice. I also made '--compile' the default, as it should be much less often that raw data needs to be inserted. Even files that are essentially raw binary blobs, like `.wwise_event`, still have some custom fields that need to be accounted for. --- crates/dtmt/src/cmd/bundle/inject.rs | 327 +++++++++++++++++++++------ lib/sdk/src/bundle/file.rs | 23 +- lib/sdk/src/bundle/mod.rs | 3 +- lib/sdk/src/lib.rs | 2 +- 4 files changed, 277 insertions(+), 78 deletions(-) diff --git a/crates/dtmt/src/cmd/bundle/inject.rs b/crates/dtmt/src/cmd/bundle/inject.rs index 2b86691..21f4a91 100644 --- a/crates/dtmt/src/cmd/bundle/inject.rs +++ b/crates/dtmt/src/cmd/bundle/inject.rs @@ -1,112 +1,297 @@ -use std::path::PathBuf; +use std::path::{Path, PathBuf}; +use std::str::FromStr as _; -use clap::{value_parser, Arg, ArgMatches, Command}; -use color_eyre::eyre::{self, Context, Result}; +use clap::{value_parser, Arg, ArgAction, ArgMatches, Command}; +use color_eyre::eyre::{self, Context, OptionExt, Result}; use color_eyre::Help; -use sdk::Bundle; -use tokio::fs::{self, File}; -use tokio::io::AsyncReadExt; +use path_slash::PathBufExt as _; +use sdk::murmur::IdString64; +use sdk::{Bundle, BundleFile, BundleFileType}; +use tokio::fs; pub(crate) fn command_definition() -> Command { Command::new("inject") - .about("Inject a file into a bundle.") - .arg( - Arg::new("replace") - .help("The name of a file in the bundle whos content should be replaced.") - .short('r') - .long("replace"), - ) + .subcommand_required(true) + .about("Inject a file into a bundle.\n\ + Raw binary data can be used to directly replace the file's variant data blob without affecting the metadata.\n\ + Alternatively, a compiler format may be specified, and a complete bundle file is created.") .arg( Arg::new("output") .help( "The path to write the changed bundle to. \ - If omitted, the input bundle will be overwritten.", + If omitted, the input bundle will be overwritten.\n\ + Remember to add a `.patch_` suffix if you also use '--patch'.", ) .short('o') .long("output") .value_parser(value_parser!(PathBuf)), ) .arg( - Arg::new("bundle") - .help("Path to the bundle to inject the file into.") - .required(true) - .value_parser(value_parser!(PathBuf)), + Arg::new("patch") + .help("Create a patch bundle. Optionally, a patch NUMBER may be specified as \ + '--patch=123'.\nThe maximum number is 999, the default is 1.\n\ + If `--output` is not specified, the `.patch_` suffix is added to \ + the given bundle name.") + .short('p') + .long("patch") + .num_args(0..=1) + .require_equals(true) + .default_missing_value("1") + .value_name("NUMBER") + .value_parser(value_parser!(u16)) ) .arg( - Arg::new("file") - .help("Path to the file to inject.") - .required(true) - .value_parser(value_parser!(PathBuf)), + Arg::new("type") + .help("Compile the new file as the given TYPE. If omitted, the file type is \ + is guessed from the file extension.") + .value_name("TYPE") ) + .subcommand( + Command::new("replace") + .about("Replace an existing file in the bundle") + .arg( + Arg::new("variant") + .help("In combination with '--raw', specify the variant index to replace.") + .long("variant") + .default_value("0") + .value_parser(value_parser!(u8)) + ) + .arg( + Arg::new("raw") + .help("Insert the given file as raw binary data.\n\ + Cannot be used with '--patch'.") + .long("raw") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("bundle") + .help("Path to the bundle to inject the file into.") + .required(true) + .value_parser(value_parser!(PathBuf)), + ) + .arg( + Arg::new("bundle-file") + .help("The name of a file in the bundle whose content should be replaced.") + .required(true), + ) + .arg( + Arg::new("new-file") + .help("Path to the file to inject.") + .required(true) + .value_parser(value_parser!(PathBuf)), + ), + ) + // .subcommand( + // Command::new("add") + // .about("Add a new file to the bundle") + // .arg( + // Arg::new("new-file") + // .help("Path to the file to inject.") + // .required(true) + // .value_parser(value_parser!(PathBuf)), + // ) + // .arg( + // Arg::new("bundle") + // .help("Path to the bundle to inject the file into.") + // .required(true) + // .value_parser(value_parser!(PathBuf)), + // ), + // ) } -#[tracing::instrument(skip_all)] +#[tracing::instrument] +async fn compile_file( + path: impl AsRef + std::fmt::Debug, + name: impl Into + std::fmt::Debug, + file_type: BundleFileType, +) -> Result { + let path = path.as_ref(); + + let file_data = fs::read(&path) + .await + .wrap_err_with(|| format!("Failed to read file '{}'", path.display()))?; + let _sjson = String::from_utf8(file_data) + .wrap_err_with(|| format!("Invalid UTF8 data in '{}'", path.display()))?; + + let _root = path.parent().ok_or_eyre("File path has no parent")?; + + eyre::bail!( + "Compilation for type '{}' is not implemented, yet", + file_type + ) +} + +#[tracing::instrument( + skip_all, + fields( + bundle_path = tracing::field::Empty, + in_file_path = tracing::field::Empty, + output_path = tracing::field::Empty, + target_name = tracing::field::Empty, + file_type = tracing::field::Empty, + raw = tracing::field::Empty, + ) +)] pub(crate) async fn run(ctx: sdk::Context, matches: &ArgMatches) -> Result<()> { - let bundle_path = matches + let Some((op, sub_matches)) = matches.subcommand() else { + unreachable!("clap is configured to require a subcommand, and they're all handled above"); + }; + + let bundle_path = sub_matches .get_one::("bundle") .expect("required parameter not found"); - let file_path = matches - .get_one::("file") + let in_file_path = sub_matches + .get_one::("new-file") .expect("required parameter not found"); - tracing::trace!(bundle_path = %bundle_path.display(), file_path = %file_path.display()); + let patch_number = matches + .get_one::("patch") + .map(|num| format!("{:03}", num)); - let mut bundle = { - let binary = fs::read(bundle_path).await?; - let name = Bundle::get_name_from_path(&ctx, bundle_path); - Bundle::from_binary(&ctx, name, binary).wrap_err("Failed to open bundle file")? + let output_path = matches + .get_one::("output") + .cloned() + .unwrap_or_else(|| { + let mut output_path = bundle_path.clone(); + + if let Some(patch_number) = patch_number.as_ref() { + output_path.set_extension(format!("patch_{:03}", patch_number)); + } + + output_path + }); + + let target_name = if op == "replace" { + sub_matches + .get_one::("bundle-file") + .map(|name| match u64::from_str_radix(name, 16) { + Ok(id) => IdString64::from(id), + Err(_) => IdString64::String(name.clone()), + }) + .expect("argument is required") + } else { + let mut path = PathBuf::from(in_file_path); + path.set_extension(""); + IdString64::from(path.to_slash_lossy().to_string()) }; - if let Some(name) = matches.get_one::("replace") { - let mut file = File::open(&file_path) - .await - .wrap_err_with(|| format!("Failed to open '{}'", file_path.display()))?; + let file_type = if let Some(forced_type) = matches.get_one::("type") { + BundleFileType::from_str(forced_type.as_str()).wrap_err("Unknown file type")? + } else { + in_file_path + .extension() + .and_then(|s| s.to_str()) + .ok_or_eyre("File extension missing") + .and_then(BundleFileType::from_str) + .wrap_err("Unknown file type") + .with_suggestion(|| "Use '--type TYPE' to specify the file type")? + }; - if let Some(variant) = bundle - .files_mut() - .filter(|file| file.matches_name(name.clone())) - // TODO: Handle file variants - .find_map(|file| file.variants_mut().next()) - { - let mut data = Vec::new(); - file.read_to_end(&mut data) - .await - .wrap_err("Failed to read input file")?; - variant.set_data(data); - } else { - let err = eyre::eyre!("No file '{}' in this bundle.", name) - .with_suggestion(|| { + { + let span = tracing::Span::current(); + if !span.is_disabled() { + span.record("bundle_path", bundle_path.display().to_string()); + span.record("in_file_path", in_file_path.display().to_string()); + span.record("output_path", output_path.display().to_string()); + span.record("raw", sub_matches.get_flag("raw")); + span.record("target_name", target_name.display().to_string()); + span.record("file_type", format!("{:?}", file_type)); + } + } + + let bundle_name = Bundle::get_name_from_path(&ctx, bundle_path); + let mut bundle = { + let binary = fs::read(bundle_path).await?; + Bundle::from_binary(&ctx, bundle_name.clone(), binary) + .wrap_err_with(|| format!("Failed to open bundle '{}'", bundle_path.display()))? + }; + + if op == "copy" { + unimplemented!("Implement copying a file from one bundle to the other."); + } + + let output_bundle = match op { + "replace" => { + let Some(file) = bundle + .files_mut() + .find(|file| *file.base_name() == target_name) + else { + let err = eyre::eyre!( + "No file with name '{}' in bundle '{}'", + target_name.display(), + bundle_path.display() + ); + + return Err(err).with_suggestion(|| { format!( - "Run '{} bundle list {}' to list the files in this bundle.", + "Run '{} bundle list \"{}\"' to list the files in this bundle.", clap::crate_name!(), bundle_path.display() ) - }) - .with_suggestion(|| { - format!( - "Use '{} bundle inject --add {} {} {}' to add it as a new file", - clap::crate_name!(), - name, - bundle_path.display(), - file_path.display() - ) }); + }; - return Err(err); + if sub_matches.get_flag("raw") { + let variant_index = sub_matches + .get_one::("variant") + .expect("argument with default missing"); + + let Some(variant) = file.variants_mut().nth(*variant_index as usize) else { + let err = eyre::eyre!( + "Variant index '{}' does not exist in '{}'", + variant_index, + target_name.display() + ); + + return Err(err).with_suggestion(|| { + format!( + "See '{} bundle inject add --help' if you want to add it as a new file", + clap::crate_name!(), + ) + }); + }; + + let data = tokio::fs::read(&in_file_path).await.wrap_err_with(|| { + format!("Failed to read file '{}'", in_file_path.display()) + })?; + variant.set_data(data); + file.set_modded(true); + bundle + } else { + let mut bundle_file = compile_file(in_file_path, target_name.clone(), file_type) + .await + .wrap_err("Failed to compile")?; + + bundle_file.set_modded(true); + + if patch_number.is_some() { + let mut output_bundle = Bundle::new(bundle_name); + output_bundle.add_file(bundle_file); + output_bundle + } else { + *file = bundle_file; + + dbg!(&file); + bundle + } + } } + "add" => { + unimplemented!("Implement adding a new file to the bundle."); + } + _ => unreachable!("no other operations exist"), + }; - let out_path = matches.get_one::("output").unwrap_or(bundle_path); - let data = bundle - .to_binary() - .wrap_err("Failed to write changed bundle to output")?; + let data = output_bundle + .to_binary() + .wrap_err("Failed to write changed bundle to output")?; - fs::write(out_path, &data) - .await - .wrap_err("Failed to write data to output file")?; + fs::write(&output_path, &data) + .await + .wrap_err_with(|| format!("Failed to write data to '{}'", output_path.display()))?; - Ok(()) - } else { - eyre::bail!("Currently, only the '--replace' operation is supported."); - } + tracing::info!("Modified bundle written to '{}'", output_path.display()); + + Ok(()) } diff --git a/lib/sdk/src/bundle/file.rs b/lib/sdk/src/bundle/file.rs index f387409..6d49821 100644 --- a/lib/sdk/src/bundle/file.rs +++ b/lib/sdk/src/bundle/file.rs @@ -20,6 +20,7 @@ struct BundleFileHeader { len_data_file_name: usize, } +#[derive(Clone, Debug)] pub struct BundleFileVariant { property: u32, data: Vec, @@ -109,9 +110,12 @@ bitflags! { #[derive(Default, Clone, Copy, Debug)] pub struct Properties: u32 { const DATA = 0b100; + // A custom flag used by DTMT to signify a file altered by mods. + const MODDED = 1 << 31; } } +#[derive(Clone, Debug)] pub struct BundleFile { file_type: BundleFileType, name: IdString64, @@ -133,6 +137,18 @@ impl BundleFile { self.variants.push(variant) } + pub fn set_variants(&mut self, variants: Vec) { + self.variants = variants; + } + + pub fn set_props(&mut self, props: Properties) { + self.props = props; + } + + pub fn set_modded(&mut self, is_modded: bool) { + self.props.set(Properties::MODDED, is_modded); + } + #[tracing::instrument(name = "File::read", skip(ctx, r))] pub fn from_reader(ctx: &crate::Context, r: &mut R, props: Properties) -> Result where @@ -299,14 +315,13 @@ impl BundleFile { s } - pub fn matches_name(&self, name: impl Into) -> bool { - let name = name.into(); - if self.name == name { + pub fn matches_name(&self, name: &IdString64) -> bool { + if self.name == *name { return true; } if let IdString64::String(name) = name { - self.name(false, None) == name || self.name(true, None) == name + self.name(false, None) == *name || self.name(true, None) == *name } else { false } diff --git a/lib/sdk/src/bundle/mod.rs b/lib/sdk/src/bundle/mod.rs index 075f4d2..edb71bb 100644 --- a/lib/sdk/src/bundle/mod.rs +++ b/lib/sdk/src/bundle/mod.rs @@ -7,14 +7,13 @@ use color_eyre::{Help, Report, SectionExt}; use oodle::{OodleLZ_CheckCRC, OodleLZ_FuzzSafe, CHUNK_SIZE}; use crate::binary::sync::*; -use crate::bundle::file::Properties; use crate::murmur::{HashGroup, IdString64, Murmur64}; pub(crate) mod database; pub(crate) mod file; pub(crate) mod filetype; -pub use file::{BundleFile, BundleFileVariant}; +pub use file::{BundleFile, BundleFileVariant, Properties}; pub use filetype::BundleFileType; #[derive(Clone, Copy, Debug, PartialEq, PartialOrd)] diff --git a/lib/sdk/src/lib.rs b/lib/sdk/src/lib.rs index a24b3bd..9b1806b 100644 --- a/lib/sdk/src/lib.rs +++ b/lib/sdk/src/lib.rs @@ -9,5 +9,5 @@ pub mod murmur; pub use binary::{FromBinary, ToBinary}; pub use bundle::database::BundleDatabase; pub use bundle::decompress; -pub use bundle::{Bundle, BundleFile, BundleFileType, BundleFileVariant}; +pub use bundle::{Bundle, BundleFile, BundleFileType, BundleFileVariant, Properties}; pub use context::{CmdLine, Context}; From f521e20f2b61aef35315081c7f6c78746acda679 Mon Sep 17 00:00:00 2001 From: Renovate Date: Thu, 15 May 2025 22:16:23 +0000 Subject: [PATCH 81/99] chore(deps): update rust crate csv-async to v1.3.1 --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c4ec109..88a9bb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -704,9 +704,9 @@ dependencies = [ [[package]] name = "csv-async" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37fe5b0d07f4a8260ce1e9a81413e88f459af0f2dfc55c15e96868a2f99c0f0" +checksum = "888dbb0f640d2c4c04e50f933885c7e9c95995d93cec90aba8735b4c610f26f1" dependencies = [ "cfg-if", "csv-core", @@ -2173,7 +2173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] From 164cb7bc131199a5089e9a2cb8dffe89fabbc9ff Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 20 May 2025 12:46:31 +0000 Subject: [PATCH 82/99] chore(deps): update rust crate tempfile to v3.20.0 --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 88a9bb9..bc37db3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1045,7 +1045,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3195,7 +3195,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3710,15 +3710,15 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", "rustix 1.0.5", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4543,7 +4543,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] From ca677606fa25fd62466963e3e65efc7db82bb5f9 Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 20 May 2025 13:16:25 +0000 Subject: [PATCH 83/99] chore(deps): update rust crate bitflags to v2.9.1 --- Cargo.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc37db3..aa01c87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,7 +233,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cexpr", "clang-sys", "itertools", @@ -253,7 +253,7 @@ version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cexpr", "clang-sys", "itertools", @@ -275,9 +275,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bitmaps" @@ -917,7 +917,7 @@ dependencies = [ "ansi-parser", "async-recursion", "bincode", - "bitflags 2.9.0", + "bitflags 2.9.1", "clap", "color-eyre", "colors-transform", @@ -1955,7 +1955,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "inotify-sys", "libc", ] @@ -2182,7 +2182,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "libc", "redox_syscall", ] @@ -2445,7 +2445,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "filetime", "fsevent-sys", "inotify", @@ -2548,7 +2548,7 @@ version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "foreign-types", "libc", @@ -2986,7 +2986,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -3178,7 +3178,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.4.14", @@ -3191,7 +3191,7 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.4", @@ -3325,7 +3325,7 @@ name = "sdk" version = "0.3.0" dependencies = [ "async-recursion", - "bitflags 2.9.0", + "bitflags 2.9.1", "byteorder", "color-eyre", "csv-async", @@ -3352,7 +3352,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation", "core-foundation-sys", "libc", @@ -3674,7 +3674,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation", "system-configuration-sys", ] @@ -4851,7 +4851,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] From 1975435805f5aded7a9eaf3cb9c0a6eefd1c9ff0 Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 20 May 2025 13:16:29 +0000 Subject: [PATCH 84/99] chore(deps): update rust crate clap to v4.5.38 --- Cargo.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc37db3..ed45902 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,9 +426,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" dependencies = [ "clap_builder", "clap_derive", @@ -436,9 +436,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" dependencies = [ "anstream", "anstyle", @@ -1045,7 +1045,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3195,7 +3195,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3718,7 +3718,7 @@ dependencies = [ "getrandom 0.3.2", "once_cell", "rustix 1.0.5", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] From 1e9738c953051cd678000ab78e2cd01b2428e30c Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 20 May 2025 13:16:37 +0000 Subject: [PATCH 85/99] chore(deps): update rust crate tokio to v1.45.0 --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc37db3..29df0e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1045,7 +1045,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3195,7 +3195,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3718,7 +3718,7 @@ dependencies = [ "getrandom 0.3.2", "once_cell", "rustix 1.0.5", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3850,9 +3850,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.44.2" +version = "1.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" dependencies = [ "backtrace", "bytes", From 5e1581b428f028ef637c05b2d10598d6bbb148fc Mon Sep 17 00:00:00 2001 From: Renovate Date: Wed, 21 May 2025 08:31:36 +0000 Subject: [PATCH 86/99] chore(deps): update rust crate minijinja to v2.10.2 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3eb31bc..7fb7b22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2302,9 +2302,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.9.0" +version = "2.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98642a6dfca91122779a307b77cd07a4aa951fbe32232aaf5bad9febc66be754" +checksum = "dd72e8b4e42274540edabec853f607c015c73436159b06c39c7af85a20433155" dependencies = [ "serde", ] From 14eded5b7e1d3b43bcbd6b5d04860fe69ee4ea42 Mon Sep 17 00:00:00 2001 From: Renovate Date: Wed, 21 May 2025 08:31:45 +0000 Subject: [PATCH 87/99] chore(deps): update rust crate zip to v3 --- Cargo.lock | 41 +++++++++++++++++++++++++---------------- Cargo.toml | 2 +- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3eb31bc..212dc5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -686,12 +686,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - [[package]] name = "crypto-common" version = "0.1.6" @@ -1118,12 +1112,13 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.32" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" +checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "libz-rs-sys", + "miniz_oxide 0.8.8", ] [[package]] @@ -2173,7 +2168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2187,6 +2182,15 @@ dependencies = [ "redox_syscall", ] +[[package]] +name = "libz-rs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6489ca9bd760fe9642d7644e827b0c9add07df89857b0416ee15c1cc1a3b8c5a" +dependencies = [ + "zlib-rs", +] + [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -2327,9 +2331,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", ] @@ -4543,7 +4547,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -4965,14 +4969,13 @@ dependencies = [ [[package]] name = "zip" -version = "2.6.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744" +checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308" dependencies = [ "arbitrary", "bzip2", "crc32fast", - "crossbeam-utils", "flate2", "indexmap", "memchr", @@ -4981,6 +4984,12 @@ dependencies = [ "zstd", ] +[[package]] +name = "zlib-rs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "868b928d7949e09af2f6086dfc1e01936064cc7a819253bce650d4e2a2d63ba8" + [[package]] name = "zopfli" version = "0.8.1" diff --git a/Cargo.toml b/Cargo.toml index 87d9ea6..4b083a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ tracing = { version = "0.1.37", features = ["async-await"] } tracing-error = "0.2.0" tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } usvg = "0.25.0" -zip = { version = "2.1.3", default-features = false, features = ["deflate", "bzip2", "zstd", "time"] } +zip = { version = "3.0.0", default-features = false, features = ["deflate", "bzip2", "zstd", "time"] } [profile.dev.package.backtrace] opt-level = 3 From 6d576be4ae62d95e4e827cda3a1123430cf31120 Mon Sep 17 00:00:00 2001 From: Renovate Date: Wed, 21 May 2025 09:16:27 +0000 Subject: [PATCH 88/99] chore(deps): update rust crate confy to v1 --- Cargo.lock | 31 +++++++++++++++++++++---------- Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee85157..f4ee177 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -581,13 +581,13 @@ checksum = "9226dbc05df4fb986f48d730b001532580883c4c06c5d1c213f4b34c1c157178" [[package]] name = "confy" -version = "0.6.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45b1f4c00870f07dc34adcac82bb6a72cc5aabca8536ba1797e01df51d2ce9a0" +checksum = "f29222b549d4e3ded127989d523da9e928918d0d0d7f7c1690b439d0d538bae9" dependencies = [ "directories", "serde", - "thiserror 1.0.63", + "thiserror 2.0.12", "toml 0.8.19", ] @@ -766,9 +766,9 @@ dependencies = [ [[package]] name = "directories" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" dependencies = [ "dirs-sys", ] @@ -785,14 +785,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users", - "windows-sys 0.48.0", + "redox_users 0.5.0", + "windows-sys 0.59.0", ] [[package]] @@ -802,7 +802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.6", "winapi", ] @@ -3004,6 +3004,17 @@ dependencies = [ "thiserror 1.0.63", ] +[[package]] +name = "redox_users" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 2.0.12", +] + [[package]] name = "regex" version = "1.11.1" diff --git a/Cargo.toml b/Cargo.toml index 4b083a9..3619e5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ clap = { version = "4.0.15", features = ["color", "derive", "std", "cargo", "str cli-table = { version = "0.5.0", default-features = false, features = ["derive"] } color-eyre = { path = "lib/color-eyre" } colors-transform = "0.2.11" -confy = "0.6.1" +confy = "1.0.0" csv-async = { version = "1.2.4", features = ["tokio", "serde"] } druid = { version = "0.8", features = ["im", "serde", "image", "png", "jpeg", "bmp", "webp", "svg"] } druid-widget-nursery = "0.1" From 27062d22040199a00db630623f4e76d4c0b907e9 Mon Sep 17 00:00:00 2001 From: Renovate Date: Wed, 21 May 2025 22:01:36 +0000 Subject: [PATCH 89/99] chore(deps): update rust crate zip to v4 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee85157..831d598 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4969,9 +4969,9 @@ dependencies = [ [[package]] name = "zip" -version = "3.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308" +checksum = "153a6fff49d264c4babdcfa6b4d534747f520e56e8f0f384f3b808c4b64cc1fd" dependencies = [ "arbitrary", "bzip2", diff --git a/Cargo.toml b/Cargo.toml index 4b083a9..eb0dceb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ tracing = { version = "0.1.37", features = ["async-await"] } tracing-error = "0.2.0" tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } usvg = "0.25.0" -zip = { version = "3.0.0", default-features = false, features = ["deflate", "bzip2", "zstd", "time"] } +zip = { version = "4.0.0", default-features = false, features = ["deflate", "bzip2", "zstd", "time"] } [profile.dev.package.backtrace] opt-level = 3 From 220f37c7288c16e84c7a24a0c985b0d73cf99dc1 Mon Sep 17 00:00:00 2001 From: Renovate Date: Sat, 24 May 2025 15:01:28 +0000 Subject: [PATCH 90/99] chore(deps): update rust crate tokio to v1.45.1 --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee85157..555a11a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2168,7 +2168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -3854,9 +3854,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.45.0" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "bytes", From 3901355f9d89104d5c9f461609852702ba4462f7 Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 27 May 2025 18:16:25 +0000 Subject: [PATCH 91/99] chore(deps): update rust crate clap to v4.5.39 --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee85157..09c09c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,9 +426,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.38" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" +checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" dependencies = [ "clap_builder", "clap_derive", @@ -436,9 +436,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.38" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" +checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" dependencies = [ "anstream", "anstyle", @@ -2168,7 +2168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] From d66dcb5cfd9a83f376c389add3eca4d71a575fd6 Mon Sep 17 00:00:00 2001 From: Renovate Date: Wed, 28 May 2025 16:31:22 +0000 Subject: [PATCH 92/99] fix(deps): update rust crate reqwest to v0.12.18 --- Cargo.lock | 73 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee85157..e9263f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1742,22 +1742,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" +checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" dependencies = [ + "base64 0.22.1", "bytes", "futures-channel", + "futures-core", "futures-util", "http", "http-body", "hyper", + "ipnet", "libc", + "percent-encoding", "pin-project-lite", "socket2", + "system-configuration", "tokio", "tower-service", "tracing", + "windows-registry", ] [[package]] @@ -2014,6 +2020,16 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is-docker" version = "0.2.0" @@ -2168,7 +2184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -3050,15 +3066,14 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.15" +version = "0.12.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" +checksum = "e98ff6b0dbbe4d5a37318f433d4fc82babd21631f194d370409ceb2e40b2f0b5" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", "futures-core", - "futures-util", "h2", "http", "http-body", @@ -3075,21 +3090,20 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", "tokio-native-tls", "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-registry", ] [[package]] @@ -3215,21 +3229,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-webpki" @@ -3674,9 +3681,9 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.9.1", "core-foundation", @@ -3995,6 +4002,24 @@ dependencies = [ "tower-service", ] +[[package]] +name = "tower-http" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" +dependencies = [ + "bitflags 2.9.1", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -4547,7 +4572,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] From 138cb79ff6285b6ea504d287e2c4509275cdeaad Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Fri, 30 May 2025 11:52:44 +0200 Subject: [PATCH 93/99] Disable excessive rebase for Renovate --- .renovaterc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.renovaterc b/.renovaterc index 4a2fbf4..7ad59cd 100644 --- a/.renovaterc +++ b/.renovaterc @@ -3,8 +3,7 @@ "extends": [ "config:recommended", ":combinePatchMinorReleases", - ":enableVulnerabilityAlerts", - ":rebaseStalePrs" + ":enableVulnerabilityAlerts" ], "prConcurrentLimit": 10, "branchPrefix": "renovate/", From bb9223a43eaf2aba6cbfc38660bd9c5769e3dfe6 Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 2 Jun 2025 12:16:19 +0000 Subject: [PATCH 94/99] fix(deps): update rust crate reqwest to v0.12.19 --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f1039a..87a86de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3077,9 +3077,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.18" +version = "0.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff6b0dbbe4d5a37318f433d4fc82babd21631f194d370409ceb2e40b2f0b5" +checksum = "a2f8e5513d63f2e5b386eb5106dc67eaf3f84e95258e210489136b8b92ad6119" dependencies = [ "base64 0.22.1", "bytes", @@ -4015,9 +4015,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" +checksum = "5cc2d9e086a412a451384326f521c8123a99a466b329941a9403696bff9b0da2" dependencies = [ "bitflags 2.9.1", "bytes", From 8749d4e6be6974bf91050d702b759a32f5081516 Mon Sep 17 00:00:00 2001 From: Renovate Date: Sun, 8 Jun 2025 11:46:19 +0000 Subject: [PATCH 95/99] chore(deps): update rust crate bindgen to 0.72.0 --- Cargo.lock | 10 +++++----- lib/oodle/Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 87a86de..89bb171 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -249,9 +249,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.71.1" +version = "0.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f" dependencies = [ "bitflags 2.9.1", "cexpr", @@ -2184,7 +2184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2546,7 +2546,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" name = "oodle" version = "0.1.0" dependencies = [ - "bindgen 0.71.1", + "bindgen 0.72.0", "color-eyre", "tracing", ] @@ -4583,7 +4583,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/lib/oodle/Cargo.toml b/lib/oodle/Cargo.toml index e679b5f..4a6fe2f 100644 --- a/lib/oodle/Cargo.toml +++ b/lib/oodle/Cargo.toml @@ -10,4 +10,4 @@ color-eyre = { workspace = true } tracing = { workspace = true } [build-dependencies] -bindgen = "0.71.0" +bindgen = "0.72.0" From 4fd17a2d0d42673c626b46bd378e53de2076d2ee Mon Sep 17 00:00:00 2001 From: Renovate Date: Mon, 9 Jun 2025 18:16:20 +0000 Subject: [PATCH 96/99] chore(deps): update rust crate clap to v4.5.40 --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 87a86de..5e49e15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,9 +426,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.39" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ "clap_builder", "clap_derive", @@ -436,9 +436,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.39" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" dependencies = [ "anstream", "anstyle", @@ -450,9 +450,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ "heck 0.5.0", "proc-macro2", From 6b7d5265ad64c76d5babf8fb33c7109a165c9b29 Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 10 Jun 2025 19:01:29 +0000 Subject: [PATCH 97/99] fix(deps): update rust crate reqwest to v0.12.20 --- Cargo.lock | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 87a86de..4136148 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3077,9 +3077,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.19" +version = "0.12.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2f8e5513d63f2e5b386eb5106dc67eaf3f84e95258e210489136b8b92ad6119" +checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" dependencies = [ "base64 0.22.1", "bytes", @@ -3093,12 +3093,10 @@ dependencies = [ "hyper-rustls", "hyper-tls", "hyper-util", - "ipnet", "js-sys", "log", "mime", "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", "rustls-pki-types", From fb072e1fba9f5e21670628c0c01a21ff33826f4e Mon Sep 17 00:00:00 2001 From: Renovate Date: Wed, 11 Jun 2025 09:31:38 +0000 Subject: [PATCH 98/99] chore(deps): update rust crate nanorand to 0.8.0 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe6f1cd..44197f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2369,9 +2369,9 @@ dependencies = [ [[package]] name = "nanorand" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +checksum = "6e3d189da485332e96ba8a5ef646a311871abd7915bf06ac848a9117f19cf6e4" [[package]] name = "native-tls" diff --git a/Cargo.toml b/Cargo.toml index 8d51a45..99ce493 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ interprocess = "2.1.0" lazy_static = "1.4.0" luajit2-sys = { path = "lib/luajit2-sys" } minijinja = { version = "2.0.1", default-features = false, features = ["serde"] } -nanorand = "0.7.0" +nanorand = "0.8.0" nexusmods = { path = "lib/nexusmods" } notify = "8.0.0" oodle = { path = "lib/oodle" } From 03a11269a244f0d2b088d28daed5368f7ccb2a12 Mon Sep 17 00:00:00 2001 From: Renovate Date: Sun, 15 Jun 2025 04:01:33 +0000 Subject: [PATCH 99/99] chore(deps): update rust crate zip to v4.1.0 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 44197f8..609555e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5003,9 +5003,9 @@ dependencies = [ [[package]] name = "zip" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "153a6fff49d264c4babdcfa6b4d534747f520e56e8f0f384f3b808c4b64cc1fd" +checksum = "af7dcdb4229c0e79c2531a24de7726a0e980417a74fb4d030a35f535665439a0" dependencies = [ "arbitrary", "bzip2",