Skip to content

Commit 506c251

Browse files
committed
Various fixes
1 parent f3c157f commit 506c251

File tree

9 files changed

+39
-65
lines changed

9 files changed

+39
-65
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ jobs:
236236
uses: dtolnay/rust-toolchain@nightly
237237
with:
238238
targets: wasm32-wasip2
239+
components: rust-src
239240
- name: Cache Rust workspace
240241
uses: Swatinem/rust-cache@v2
241242
- name: Install dependencies

objdiff-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ argp = "0.4"
1818
crossterm = "0.28"
1919
enable-ansi-support = "0.2"
2020
memmap2 = "0.9"
21-
objdiff-core = { path = "../objdiff-core", features = ["ppc", "std", "config", "dwarf", "bindings", "serde"] }
21+
objdiff-core = { path = "../objdiff-core", features = ["all"] }
2222
prost = "0.13"
2323
ratatui = "0.29"
2424
rayon = "1.10"

objdiff-core/Cargo.toml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ all = [
2626
"arm64",
2727
"mips",
2828
"ppc",
29-
"x86",
29+
# "x86",
3030
]
3131
# Implicit, used to check if any arch is enabled
3232
any-arch = [
@@ -193,20 +193,7 @@ serde = { version = "1.0", features = ["derive"] }
193193
serde_json = { version = "1.0" }
194194
syn = { version = "2.0", optional = true }
195195

196-
# Enable all features for tests
197196
[dev-dependencies]
198-
objdiff-core = { path = ".", features = [
199-
# Features
200-
"bindings",
201-
"build",
202-
"config",
203-
"dwarf",
204-
"serde",
205-
# Architectures
206-
"mips",
207-
"ppc",
208-
# "x86",
209-
"arm",
210-
"arm64",
211-
] }
197+
# Enable all features for tests
198+
objdiff-core = { path = ".", features = ["all"] }
212199
insta = "1.42.1"

objdiff-core/src/arch/mips.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,7 @@ fn push_args(
285285
} else {
286286
arg_cb(InstructionPart::Arg(InstructionArg::Value(
287287
InstructionArgValue::Opaque(
288-
op.display(instruction, display_flags, None::<&str>)
289-
.to_string()
290-
.into(),
288+
op.display(instruction, display_flags, None::<&str>).to_string().into(),
291289
),
292290
)))?;
293291
}

objdiff-core/src/diff/data.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ fn diff_data_relocs_for_range<'left, 'right>(
107107
if reloc_eq(left_obj, right_obj, &left_reloc, &right_reloc) {
108108
diffs.push((DataDiffKind::None, Some(left_reloc), Some(right_reloc)));
109109
} else {
110-
diffs.push((
111-
DataDiffKind::Replace,
112-
Some(left_reloc),
113-
Some(right_reloc),
114-
));
110+
diffs.push((DataDiffKind::Replace, Some(left_reloc), Some(right_reloc)));
115111
}
116112
}
117113
for right_reloc in right_section.relocations.iter() {

objdiff-core/tests/arch_x86.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

objdiff-gui/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ float-ord = "0.3"
3838
font-kit = "0.14"
3939
globset = { version = "0.4", features = ["serde1"] }
4040
log = "0.4"
41-
objdiff-core = { path = "../objdiff-core", features = ["ppc", "arm", "arm64", "mips", "std", "config", "dwarf", "bindings", "serde", "build"] }
41+
objdiff-core = { path = "../objdiff-core", features = ["all"] }
4242
open = "5.3"
4343
png = "0.17"
4444
pollster = "0.4"

objdiff-wasm/package-lock.json

Lines changed: 28 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

objdiff-wasm/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
"scripts": {
1919
"build": "npm run build:wasm && npm run build:transpile && npm run build:lib",
2020
"build:wasm": "cargo +nightly -Zbuild-std=panic_abort,core,alloc -Zbuild-std-features=compiler-builtins-mem build --target wasm32-wasip2 --release --no-default-features",
21-
"build:transpile": "jco transpile ../target/wasm32-wasip2/release/objdiff_wasm.wasm --no-nodejs-compat --no-wasi-shim --no-namespaced-exports --map wasi:logging/logging=./wasi-logging.js -o pkg --name objdiff",
21+
"build:transpile": "jco transpile ../target/wasm32-wasip2/release/objdiff_wasm.wasm --no-nodejs-compat --no-wasi-shim --no-namespaced-exports --map wasi:logging/logging=./wasi-logging.js --optimize -o pkg --name objdiff",
2222
"build:lib": "rslib build"
2323
},
2424
"devDependencies": {
2525
"@biomejs/biome": "^1.9.3",
26-
"@bytecodealliance/jco": "^1.9.1",
26+
"@bytecodealliance/jco": "^1.10.1",
27+
"@bytecodealliance/preview2-shim": "^0.17.1",
2728
"@rslib/core": "^0.4.1",
2829
"typescript": "^5.7.2"
2930
}

0 commit comments

Comments
 (0)