UPDATE: These are very old ideas, see https://github.com/Arnau478/hevi/issues/44#issuecomment-3045976972 for the current proposal.
This is a long-term idea that won't be implemented until version v2.0.0. The idea is to have the parsers be a separate file that the user can download and manage. So the parsers wouldn't be built-in. It's a very nice way to offer a large variety of parsers without making the binary huge. There are a few ways to do it:
- Plain text files which define a format/parser in a custom domain-specific language (DSL). Similar to ImHex's approach.
- Shared libraries that are dynamically loaded
- WASM modules
Comparison
| Approach |
Speed |
Ease of use |
Portability |
Impact on the main executable |
| DSL |
The slowest |
Extremely easy to create new parsers |
Architecture and OS-agnostic |
The executable would have to include a whole interpreter for the language |
| Shared library |
The fastest |
Very hard to create or distribute parsers |
The compatibility matrix is huge |
Almost no overhead on the main executable |
| WASM |
Pretty slow, but not as slow as the DSL |
Very hard to create or distribute parsers |
Architecture and OS-agnostic |
The executable would have to include an entire WASM VM |
Back-compatibility
Either way, this would break how parsers work. That could be an argument to put it in the v1.0.0 release. However, this would take a lot of time and would postpone the release even more (I've wanted to release it for a while now).
UPDATE: These are very old ideas, see https://github.com/Arnau478/hevi/issues/44#issuecomment-3045976972 for the current proposal.
---
This is a long-term idea that won't be implemented until version `v2.0.0`. The idea is to have the parsers be a separate file that the user can download and manage. So the parsers wouldn't be built-in. It's a very nice way to offer a large variety of parsers without making the binary huge. There are a few ways to do it:
- Plain text files which define a format/parser in a custom domain-specific language (DSL). Similar to ImHex's approach.
- Shared libraries that are dynamically loaded
- WASM modules
# Comparison
| Approach | Speed | Ease of use | Portability | Impact on the main executable |
| --- | --- | --- | --- | --- |
| DSL | The slowest | Extremely easy to create new parsers | Architecture and OS-agnostic | The executable would have to include a whole interpreter for the language |
| Shared library | The fastest | Very hard to create or distribute parsers | The compatibility matrix is huge | Almost no overhead on the main executable |
| WASM | Pretty slow, but not as slow as the DSL | Very hard to create or distribute parsers | Architecture and OS-agnostic | The executable would have to include an entire WASM VM |
# Back-compatibility
Either way, this would break how parsers work. That could be an argument to put it in the `v1.0.0` release. However, this would take a lot of time and would postpone the release even more (I've wanted to release it for a while now).