Skip to content

v0.1.6: implement IDA-style plugins menu and lua API backend - #1

Merged
mylovereturns merged 2 commits into
Sidenai:mainfrom
not1cyyy:main
May 13, 2026
Merged

v0.1.6: implement IDA-style plugins menu and lua API backend#1
mylovereturns merged 2 commits into
Sidenai:mainfrom
not1cyyy:main

Conversation

@not1cyyy

Copy link
Copy Markdown
Contributor

This commit implements the plugin architecture described in docs/plugins.md, allowing users to extend Hyperion with Lua scripts loaded at startup.

Changes include:

  • LuaEngine Backend: Added internal structures (PluginEntry, PluginMenuItem) and implemented load_plugins(dir) to automatically scan and parse .lua scripts from the plugins/ directory.
  • Lua C API Registration: Implemented and registered four new Lua API functions (register_plugin, register_menu_item, register_hotkey, register_on_analysis_complete) that interface directly with the plugin registry.
  • UI Integration (App): Added a "Plugins" menu dynamically populated with flat items (for single-action plugins) and submenus (for multi-action plugins).
  • Plugin Manager: Added a new Plugin Manager... dialog displaying loaded plugins, descriptions, action counts, and error statuses.
  • Execution & Callbacks: Wired lua_.check_hotkeys() into the frame loop and run_analysis_complete_callbacks() into the analysis handoff to support custom keyboard shortcuts and post-analysis automation safely on the main thread.
  • Included example_plugin.lua built into the output directory as a working reference.

not1cyyy added 2 commits May 12, 2026 22:41
This commit implements the plugin architecture described in docs/plugins.md, allowing users to extend Hyperion with Lua scripts loaded at startup.

Changes include:
- `LuaEngine` Backend: Added internal structures (`PluginEntry`, `PluginMenuItem`) and implemented `load_plugins(dir)` to automatically scan and parse `.lua` scripts from the `plugins/` directory.
- Lua C API Registration: Implemented and registered four new Lua API functions (`register_plugin`, `register_menu_item`, `register_hotkey`, `register_on_analysis_complete`) that interface directly with the plugin registry.
- UI Integration (`App`): Added a "Plugins" menu dynamically populated with flat items (for single-action plugins) and submenus (for multi-action plugins).
- Plugin Manager: Added a new `Plugin Manager...` dialog displaying loaded plugins, descriptions, action counts, and error statuses.
- Execution & Callbacks: Wired `lua_.check_hotkeys()` into the frame loop and `run_analysis_complete_callbacks()` into the analysis handoff to support custom keyboard shortcuts and post-analysis automation safely on the main thread.
- Included `example_plugin.lua` built into the output directory as a working reference.
This commit adds a new open_results API to the Lua engine, allowing plugins to display their output in a persistent, filterable, and clickable ImGui table rather than just printing to the Script Console. Clicking a row automatically navigates the disassembler view to the target address.

Changes include:

- LuaEngine: Added open_results(title, headers, rows) API. Implemented ResultsRow and ResultsWindow structures to store results.

- App: Added render_results_windows() to display active plugin result tables natively within the UI. Includes dynamic filtering across columns and address parsing.

- Scripting API: Implemented and registered missing Lua functions (get_comment, get_string, get_image_base, get_arch, get_segments, get_cursor, create_function) that were documented but unwritten.

- Plugin Output Forwarding: Fixed invoke_menu_item() output not properly displaying in the Script Console by piping last_output() through ScriptConsole::append_output().
@mylovereturns
mylovereturns merged commit c2b5447 into Sidenai:main May 13, 2026
6 checks passed
CrackerCat pushed a commit to CrackerCat/hyperion-disassembler that referenced this pull request May 23, 2026
v0.1.6: implement IDA-style plugins menu and lua API backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant