Update all dependencies

This commit is contained in:
Luke Street 2023-05-11 02:47:57 -04:00
parent 2f778932a4
commit 100f8f8ac5
10 changed files with 1247 additions and 873 deletions

1998
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package] [package]
name = "objdiff" name = "objdiff"
version = "0.3.1" version = "0.3.2"
edition = "2021" edition = "2021"
rust-version = "1.65" rust-version = "1.65"
authors = ["Luke Street <luke@street.dev>"] authors = ["Luke Street <luke@street.dev>"]
@ -11,6 +11,7 @@ description = """
A local diffing tool for decompilation projects. A local diffing tool for decompilation projects.
""" """
publish = false publish = false
build = "build.rs"
[profile.release] [profile.release]
lto = "thin" lto = "thin"
@ -21,40 +22,40 @@ default = []
wgpu = ["eframe/wgpu"] wgpu = ["eframe/wgpu"]
[dependencies] [dependencies]
anyhow = "1.0.68" anyhow = "1.0.71"
bytes = "1.3.0" bytes = "1.4.0"
cfg-if = "1.0.0" cfg-if = "1.0.0"
const_format = "0.2.30" const_format = "0.2.30"
cwdemangle = "0.1.5" cwdemangle = "0.1.5"
eframe = { version = "0.20.1", features = ["persistence"] } eframe = { version = "0.21.3", features = ["persistence"] }
egui = "0.20.1" egui = "0.21.0"
egui_extras = "0.20.0" egui_extras = "0.21.0"
flagset = "0.4.3" flagset = "0.4.3"
log = "0.4.17" log = "0.4.17"
memmap2 = "0.5.8" memmap2 = "0.6.1"
notify = "5.0.0" notify = "5.1.0"
object = { version = "0.30.2", features = ["read_core", "std", "elf"], default-features = false } object = { version = "0.31.1", features = ["read_core", "std", "elf"], default-features = false }
png = "0.17.7" png = "0.17.8"
ppc750cl = { git = "https://github.com/terorie/ppc750cl", rev = "9ae36eef34aa6d74e00972c7671f547a2acfd0aa" } ppc750cl = { git = "https://github.com/terorie/ppc750cl", rev = "9ae36eef34aa6d74e00972c7671f547a2acfd0aa" }
rabbitizer = "1.5.8" rabbitizer = "1.7.1"
rfd = { version = "0.10.0" } #, default-features = false, features = ['xdg-portal'] rfd = { version = "0.11.3" } #, default-features = false, features = ['xdg-portal']
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
tempfile = "3.3.0" tempfile = "3.5.0"
thiserror = "1.0.38" thiserror = "1.0.40"
time = { version = "0.3.17", features = ["formatting", "local-offset"] } time = { version = "0.3.21", features = ["formatting", "local-offset"] }
toml = "0.5.11" toml = "0.7.3"
twox-hash = "1.6.3" twox-hash = "1.6.3"
byteorder = "1.4.3" byteorder = "1.4.3"
# For Linux static binaries, use rustls # For Linux static binaries, use rustls
[target.'cfg(target_os = "linux")'.dependencies] [target.'cfg(target_os = "linux")'.dependencies]
reqwest = { version = "0.11.14", default-features = false, features = ["blocking", "json", "rustls"] } reqwest = { version = "0.11.17", default-features = false, features = ["blocking", "json", "rustls"] }
self_update = { version = "0.34.0", default-features = false, features = ["rustls"] } self_update = { version = "0.36.0", default-features = false, features = ["rustls"] }
# For all other platforms, use native TLS # For all other platforms, use native TLS
[target.'cfg(not(target_os = "linux"))'.dependencies] [target.'cfg(not(target_os = "linux"))'.dependencies]
reqwest = "0.11.14" reqwest = "0.11.17"
self_update = "0.34.0" self_update = "0.36.0"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
path-slash = "0.2.1" path-slash = "0.2.1"
@ -76,5 +77,5 @@ console_error_panic_hook = "0.1.7"
tracing-wasm = "0.2" tracing-wasm = "0.2"
[build-dependencies] [build-dependencies]
anyhow = "1.0.68" anyhow = "1.0.71"
vergen = { version = "7.5.0", features = ["build", "cargo", "git"], default-features = false } vergen = { version = "8.1.3", features = ["build", "cargo", "git", "gitcl"] }

View File

@ -1,10 +1,10 @@
use anyhow::Result; use anyhow::Result;
use vergen::{vergen, Config}; use vergen::EmitBuilder;
fn main() -> Result<()> { fn main() -> Result<()> {
#[cfg(windows)] #[cfg(windows)]
{ {
winres::WindowsResource::new().set_icon("assets/icon.ico").compile()?; winres::WindowsResource::new().set_icon("assets/icon.ico").compile()?;
} }
vergen(Config::default()) EmitBuilder::builder().fail_on_error().all_build().all_cargo().all_git().emit()
} }

View File

@ -362,7 +362,7 @@ impl eframe::App for App {
ui.colored_label(Color32::LIGHT_BLUE, &demangled); ui.colored_label(Color32::LIGHT_BLUE, &demangled);
}); });
if ui.button("Copy").clicked() { if ui.button("Copy").clicked() {
ui.output().copied_text = demangled; ui.output_mut(|output| output.copied_text = demangled);
} }
} else { } else {
ui.scope(|ui| { ui.scope(|ui| {

View File

@ -76,18 +76,15 @@ where T: PartialEq {
cache_matrix[current + 1 + p] = x; cache_matrix[current + 1 + p] = x;
} }
} }
editops_from_cost_matrix::<T>(matrix_columns, matrix_rows, prefix_len, cache_matrix) editops_from_cost_matrix(matrix_columns, matrix_rows, prefix_len, cache_matrix)
} }
fn editops_from_cost_matrix<T>( fn editops_from_cost_matrix(
len1: usize, len1: usize,
len2: usize, len2: usize,
prefix_len: usize, prefix_len: usize,
cache_matrix: Vec<usize>, cache_matrix: Vec<usize>,
) -> Vec<LevEditOp> ) -> Vec<LevEditOp> {
where
T: PartialEq,
{
let mut ops = Vec::with_capacity(cache_matrix[len1 * len2 - 1]); let mut ops = Vec::with_capacity(cache_matrix[len1 * len2 - 1]);
let mut dir = 0; let mut dir = 0;
let mut i = len1 - 1; let mut i = len1 - 1;

View File

@ -54,7 +54,8 @@ fn main() {
"objdiff", "objdiff",
native_options, native_options,
Box::new(move |cc| Box::new(objdiff::App::new(cc, utc_offset, exec_path_clone))), Box::new(move |cc| Box::new(objdiff::App::new(cc, utc_offset, exec_path_clone))),
); )
.expect("Failed to run eframe application");
// Attempt to relaunch application from the updated path // Attempt to relaunch application from the updated path
if let Ok(mut guard) = exec_path.lock() { if let Ok(mut guard) = exec_path.lock() {

View File

@ -126,7 +126,8 @@ fn symbols_by_section(obj_file: &File<'_>, section: &ObjSection) -> Result<Vec<O
} }
fn common_symbols(obj_file: &File<'_>) -> Result<Vec<ObjSymbol>> { fn common_symbols(obj_file: &File<'_>) -> Result<Vec<ObjSymbol>> {
obj_file.symbols() obj_file
.symbols()
.filter(Symbol::is_common) .filter(Symbol::is_common)
.map(|symbol| to_obj_symbol(obj_file, &symbol, 0)) .map(|symbol| to_obj_symbol(obj_file, &symbol, 0))
.collect::<Result<Vec<ObjSymbol>>>() .collect::<Result<Vec<ObjSymbol>>>()

View File

@ -74,7 +74,7 @@ pub fn config_ui(ui: &mut egui::Ui, config: &Arc<RwLock<AppConfig>>, view_state:
ui.label(formatcp!("Git branch: {}", env!("VERGEN_GIT_BRANCH"))); ui.label(formatcp!("Git branch: {}", env!("VERGEN_GIT_BRANCH")));
ui.label(formatcp!("Git commit: {}", env!("VERGEN_GIT_SHA"))); ui.label(formatcp!("Git commit: {}", env!("VERGEN_GIT_SHA")));
ui.label(formatcp!("Build target: {}", env!("VERGEN_CARGO_TARGET_TRIPLE"))); ui.label(formatcp!("Build target: {}", env!("VERGEN_CARGO_TARGET_TRIPLE")));
ui.label(formatcp!("Build type: {}", env!("VERGEN_CARGO_PROFILE"))); ui.label(formatcp!("Debug: {}", env!("VERGEN_CARGO_DEBUG")));
}); });
if let Some(state) = &view_state.check_update { if let Some(state) = &view_state.check_update {
ui.label(format!("Latest version: {}", state.latest_release.version)); ui.label(format!("Latest version: {}", state.latest_release.version));
@ -96,8 +96,10 @@ pub fn config_ui(ui: &mut egui::Ui, config: &Arc<RwLock<AppConfig>>, view_state:
.on_hover_text_at_pointer("Open a link to the latest release on GitHub") .on_hover_text_at_pointer("Open a link to the latest release on GitHub")
.clicked() .clicked()
{ {
ui.output().open_url = ui.output_mut(|output| {
Some(OpenUrl { url: RELEASE_URL.to_string(), new_tab: true }); output.open_url =
Some(OpenUrl { url: RELEASE_URL.to_string(), new_tab: true })
});
} }
}); });
} }

View File

@ -226,31 +226,31 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
match arg { match arg {
Argument::Uimm(v) => { Argument::Uimm(v) => {
if ui.button(format!("Copy \"{v}\"")).clicked() { if ui.button(format!("Copy \"{v}\"")).clicked() {
ui.output().copied_text = format!("{v}"); ui.output_mut(|output| output.copied_text = format!("{v}"));
ui.close_menu(); ui.close_menu();
} }
if ui.button(format!("Copy \"{}\"", v.0)).clicked() { if ui.button(format!("Copy \"{}\"", v.0)).clicked() {
ui.output().copied_text = format!("{}", v.0); ui.output_mut(|output| output.copied_text = format!("{}", v.0));
ui.close_menu(); ui.close_menu();
} }
} }
Argument::Simm(v) => { Argument::Simm(v) => {
if ui.button(format!("Copy \"{v}\"")).clicked() { if ui.button(format!("Copy \"{v}\"")).clicked() {
ui.output().copied_text = format!("{v}"); ui.output_mut(|output| output.copied_text = format!("{v}"));
ui.close_menu(); ui.close_menu();
} }
if ui.button(format!("Copy \"{}\"", v.0)).clicked() { if ui.button(format!("Copy \"{}\"", v.0)).clicked() {
ui.output().copied_text = format!("{}", v.0); ui.output_mut(|output| output.copied_text = format!("{}", v.0));
ui.close_menu(); ui.close_menu();
} }
} }
Argument::Offset(v) => { Argument::Offset(v) => {
if ui.button(format!("Copy \"{v}\"")).clicked() { if ui.button(format!("Copy \"{v}\"")).clicked() {
ui.output().copied_text = format!("{v}"); ui.output_mut(|output| output.copied_text = format!("{v}"));
ui.close_menu(); ui.close_menu();
} }
if ui.button(format!("Copy \"{}\"", v.0)).clicked() { if ui.button(format!("Copy \"{}\"", v.0)).clicked() {
ui.output().copied_text = format!("{}", v.0); ui.output_mut(|output| output.copied_text = format!("{}", v.0));
ui.close_menu(); ui.close_menu();
} }
} }
@ -261,12 +261,12 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
if let Some(reloc) = &ins.reloc { if let Some(reloc) = &ins.reloc {
if let Some(name) = &reloc.target.demangled_name { if let Some(name) = &reloc.target.demangled_name {
if ui.button(format!("Copy \"{name}\"")).clicked() { if ui.button(format!("Copy \"{name}\"")).clicked() {
ui.output().copied_text = name.clone(); ui.output_mut(|output| output.copied_text = name.clone());
ui.close_menu(); ui.close_menu();
} }
} }
if ui.button(format!("Copy \"{}\"", reloc.target.name)).clicked() { if ui.button(format!("Copy \"{}\"", reloc.target.name)).clicked() {
ui.output().copied_text = reloc.target.name.clone(); ui.output_mut(|output| output.copied_text = reloc.target.name.clone());
ui.close_menu(); ui.close_menu();
} }
} }

View File

@ -28,12 +28,12 @@ fn symbol_context_menu_ui(ui: &mut Ui, symbol: &ObjSymbol) {
if let Some(name) = &symbol.demangled_name { if let Some(name) = &symbol.demangled_name {
if ui.button(format!("Copy \"{name}\"")).clicked() { if ui.button(format!("Copy \"{name}\"")).clicked() {
ui.output().copied_text = name.clone(); ui.output_mut(|output| output.copied_text = name.clone());
ui.close_menu(); ui.close_menu();
} }
} }
if ui.button(format!("Copy \"{}\"", symbol.name)).clicked() { if ui.button(format!("Copy \"{}\"", symbol.name)).clicked() {
ui.output().copied_text = symbol.name.clone(); ui.output_mut(|output| output.copied_text = symbol.name.clone());
ui.close_menu(); ui.close_menu();
} }
}); });
@ -282,9 +282,9 @@ pub fn symbol_diff_ui(ui: &mut Ui, view_state: &mut ViewState) {
strip.strip(|builder| { strip.strip(|builder| {
builder.sizes(Size::remainder(), 2).horizontal(|mut strip| { builder.sizes(Size::remainder(), 2).horizontal(|mut strip| {
strip.cell(|ui| { strip.cell(|ui| {
ui.push_id("left", |ui| {
if result.first_status.success { if result.first_status.success {
if let Some(obj) = &result.first_obj { if let Some(obj) = &result.first_obj {
ui.push_id("left", |ui| {
symbol_list_ui( symbol_list_ui(
ui, ui,
obj, obj,
@ -294,16 +294,16 @@ pub fn symbol_diff_ui(ui: &mut Ui, view_state: &mut ViewState) {
&lower_search, &lower_search,
&view_state.view_config, &view_state.view_config,
); );
});
} }
} else { } else {
build_log_ui(ui, &result.first_status); build_log_ui(ui, &result.first_status);
} }
}); });
});
strip.cell(|ui| { strip.cell(|ui| {
ui.push_id("right", |ui| {
if result.second_status.success { if result.second_status.success {
if let Some(obj) = &result.second_obj { if let Some(obj) = &result.second_obj {
ui.push_id("right", |ui| {
symbol_list_ui( symbol_list_ui(
ui, ui,
obj, obj,
@ -313,7 +313,6 @@ pub fn symbol_diff_ui(ui: &mut Ui, view_state: &mut ViewState) {
&lower_search, &lower_search,
&view_state.view_config, &view_state.view_config,
); );
});
} }
} else { } else {
build_log_ui(ui, &result.second_status); build_log_ui(ui, &result.second_status);
@ -322,4 +321,5 @@ pub fn symbol_diff_ui(ui: &mut Ui, view_state: &mut ViewState) {
}); });
}); });
}); });
});
} }