Skip to content

gameap/plugin-hex-editor

Repository files navigation

Hex Editor Plugin for GameAP

A plugin to view and edit files in hexadecimal format.

View on GameAP Plugins

Hex Editor Demo

Features

  • 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

Development Setup

  1. Install dependencies:

    cd frontend
    npm install
  2. Build the plugin:

    npm run build
  3. Run debug harness (after @gameap/frontend and @gameap/debug are published):

    npm run debug
  4. Watch mode for development:

    npm run dev

Compile WebAssembly

The plugin backend is written in Rust and compiled to a wasm32-wasip1 module.

Prerequisites

  • 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-proto repository checked out as a sibling directory (../gameap-proto), which provides the Rust plugin SDK

Build

make build

This 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

About

HEX Editor plugin for GameAP

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors