Hex Editor Plugin for GameAP
A plugin to view and edit files in hexadecimal format.
- Hex View: Display file contents in traditional hexadecimal format with ASCII representation
- Inline Editing: Edit bytes directly by typing hex values (0-9, A-F)
- Data Inspector: View selected bytes as different data types:
- Binary, Int8, UInt8
- Int16, UInt16, Int32, UInt32
- Int64, UInt64
- Float32, Float64
- Endianness Toggle: Switch between Little Endian and Big Endian byte order
- Byte Operations: Add new bytes or delete existing ones (Backspace/Delete keys)
- Keyboard Navigation:
- Arrow keys for movement
- Home/End for row start/end
- PageUp/PageDown for fast scrolling
- Virtual Scrolling: Efficiently handle large files with smooth scrolling
- Modification Tracking: Visual highlighting of modified bytes
- Dark Mode Support: Seamless integration with GameAP's dark theme
-
Install dependencies:
cd frontend npm install -
Build the plugin:
npm run build
-
Run debug harness (after @gameap/frontend and @gameap/debug are published):
npm run debug
-
Watch mode for development:
npm run dev
The plugin backend is written in Rust and compiled to a wasm32-wasip1 module.
- Rust toolchain (installed automatically from
rust-toolchain.toml: 1.94.0 +wasm32-wasip1) - Node.js (to build the embedded frontend)
- Binaryen for
wasm-opt(e.g.brew install binaryen) - The
gameap-protorepository checked out as a sibling directory (../gameap-proto), which provides the Rust plugin SDK
make buildThis builds the frontend (frontend/dist/plugin.js + hex-editor-plugin.css), compiles the
Rust wasm with size optimizations, runs wasm-opt -Oz, and writes hex-editor.wasm.
Or run the steps manually:
cd frontend && npm ci && npm run build && cd ..
make wasm