From 7a8efb4c88485ee590ea53085c2e61ee3c2f570c Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 23 Sep 2025 13:09:57 -0600 Subject: [PATCH] Version v3.3.0 --- AGENTS.md | 44 ++++++++++++++++++++++++++++++++++ Cargo.lock | 8 +++---- Cargo.toml | 2 +- objdiff-wasm/package-lock.json | 4 ++-- objdiff-wasm/package.json | 2 +- 5 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a1abb26 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,44 @@ +# Repository Guidelines + +## Project Structure & Module Organization + +- `objdiff-core`: core library with diffing logic and shared components +- `objdiff-cli`: CLI/TUI with `ratatui` +- `objdiff-gui`: GUI with `eframe`/`egui` +- `objdiff-wasm`: WebAssembly bindings + +objdiff has three main frontends: GUI, CLI/TUI, and [web](https://github.com/encounter/objdiff-web) (utilizing `objdiff-wasm`). + +`objdiff-gui` is the most fully-featured and is the primary target for new features. + +`objdiff-cli` has an interactive TUI `diff` mode (powered by `ratatui`) and a non-interactive `report` mode to generate detailed progress reports (e.g. for ). + +`objdiff-wasm` is compiled into a [WebAssembly Component](https://component-model.bytecodealliance.org/). The [API](objdiff-wasm/wit/objdiff.wit) is defined using [WIT](https://component-model.bytecodealliance.org/design/wit.html). The web interface is separate, but mirrors the GUI in functionality. + +## Build, Test, and Development Commands + +Run `cargo build` for a debug build and `cargo build --release` for an optimized build. +The CLI can be exercised with `cargo run --release --bin objdiff-cli -- --help`. + +The WASM build is not included in the workspace by default due to differences in toolchain and target; build it with `npm -C objdiff-wasm run build`. (nightly required) +In general, do NOT use `--workspace`, as it will include the WASM crate and likely fail. Formatting and linting commands are exempt. + +Pre-commit tasks: + +- `cargo test` to run the test suite +- `cargo +nightly fmt --all` to format code (nightly required) +- `cargo +nightly clippy --all-targets --all-features --workspace -- -D warnings` to lint code (nightly required) +- `cargo deny check` (`cargo install --locked cargo-deny` if needed) if dependencies change + +## Testing Guidelines + +Favor focused unit tests adjacent to the code, and integration scenarios in `objdiff-core/tests`. +Integration tests utilize snapshots with the `insta` crate; run `curl -LsSf https://insta.rs/install.sh | sh` if needed. +To generate updated snapshots, use `cargo insta test`, review diffs manually, then accept changes with `cargo insta accept` (or simply `mv` to accept specific snapshots). + +## Configuration Tips + +- `config.schema.json`: JSON schema for the user-facing project config file (`objdiff.json`) +- `objdiff-core/config-schema.json`: Internal options schema to generate `DiffObjConfig` (see `objdiff-core/config_gen.rs`) + +The project configuration (`objdiff.json`) is intended to be generated by the projects' build system. It includes paths to the target (expected) and base (current) object files, along with build commands and file watch patterns. See `README.md` for a summary of key options. diff --git a/Cargo.lock b/Cargo.lock index 9225573..9e452a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3484,7 +3484,7 @@ dependencies = [ [[package]] name = "objdiff-cli" -version = "3.2.1" +version = "3.3.0" dependencies = [ "anyhow", "argp", @@ -3507,7 +3507,7 @@ dependencies = [ [[package]] name = "objdiff-core" -version = "3.2.1" +version = "3.3.0" dependencies = [ "anyhow", "arm-attr", @@ -3563,7 +3563,7 @@ dependencies = [ [[package]] name = "objdiff-gui" -version = "3.2.1" +version = "3.3.0" dependencies = [ "anyhow", "argp", @@ -3601,7 +3601,7 @@ dependencies = [ [[package]] name = "objdiff-wasm" -version = "3.2.1" +version = "3.3.0" dependencies = [ "log", "objdiff-core", diff --git a/Cargo.toml b/Cargo.toml index 6593c60..c32dd5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ default-members = [ resolver = "3" [workspace.package] -version = "3.2.1" +version = "3.3.0" authors = ["Luke Street "] edition = "2024" license = "MIT OR Apache-2.0" diff --git a/objdiff-wasm/package-lock.json b/objdiff-wasm/package-lock.json index 8d8ca2d..04406b1 100644 --- a/objdiff-wasm/package-lock.json +++ b/objdiff-wasm/package-lock.json @@ -1,12 +1,12 @@ { "name": "objdiff-wasm", - "version": "3.2.1", + "version": "3.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "objdiff-wasm", - "version": "3.2.1", + "version": "3.3.0", "license": "MIT OR Apache-2.0", "devDependencies": { "@biomejs/biome": "^1.9.3", diff --git a/objdiff-wasm/package.json b/objdiff-wasm/package.json index 36c3bab..f48b9b7 100644 --- a/objdiff-wasm/package.json +++ b/objdiff-wasm/package.json @@ -1,6 +1,6 @@ { "name": "objdiff-wasm", - "version": "3.2.1", + "version": "3.3.0", "description": "A local diffing tool for decompilation projects.", "author": { "name": "Luke Street",