Add WASM parser and Vue dissector UI.
Ship a working HexPigeon: typed binary parsing in Rust/WASM, a three-pane frontend, and unit tests covering the field types. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,2 +1,43 @@
|
||||
# HexPigeon
|
||||
|
||||
Paste a hex dump, describe the layout in JSON or YAML, get a field tree and a highlighted hex view.
|
||||
|
||||
The parser is Rust compiled to WASM. The UI is Vue 3.
|
||||
|
||||
## Layout
|
||||
|
||||
```
|
||||
parser-wasm/ binary types, endianness, bitflags, strings, CRC
|
||||
frontend/ schema editor, hex view, parsed tree
|
||||
```
|
||||
|
||||
Field types: `uint8/16/32/64`, `int8/16/32`, `float32/64`, `bitflags8/16`, `bytes`, `string_fixed`, `string_lp8`, `string_lp16`, `crc16`, `crc32`, `repeated`, `padding`.
|
||||
|
||||
## Run
|
||||
|
||||
Needs `wasm-pack`, a Rust toolchain with `wasm32-unknown-unknown`, and Node 22.
|
||||
|
||||
```bash
|
||||
nix-shell # optional
|
||||
make test
|
||||
make dev
|
||||
```
|
||||
|
||||
`make dev` builds the WASM module, installs frontend deps, and starts Vite on http://localhost:5173.
|
||||
|
||||
## Schema
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Example Frame",
|
||||
"endian": "big",
|
||||
"fields": [
|
||||
{ "name": "magic", "type": "uint8" },
|
||||
{ "name": "len", "type": "uint8" },
|
||||
{ "name": "payload", "type": "string_fixed", "length": 5 },
|
||||
{ "name": "checksum", "type": "crc32", "checksum_range": [0, 11] }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Hex input is whitespace-insensitive. Hovering a field highlights its bytes; CRC fields report valid/invalid when `checksum_range` is set.
|
||||
|
||||
Reference in New Issue
Block a user