v0.1.6: implement IDA-style plugins menu and lua API backend - #1
Merged
Conversation
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().
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements the plugin architecture described in docs/plugins.md, allowing users to extend Hyperion with Lua scripts loaded at startup.
Changes include:
LuaEngineBackend: Added internal structures (PluginEntry,PluginMenuItem) and implementedload_plugins(dir)to automatically scan and parse.luascripts from theplugins/directory.register_plugin,register_menu_item,register_hotkey,register_on_analysis_complete) that interface directly with the plugin registry.App): Added a "Plugins" menu dynamically populated with flat items (for single-action plugins) and submenus (for multi-action plugins).Plugin Manager...dialog displaying loaded plugins, descriptions, action counts, and error statuses.lua_.check_hotkeys()into the frame loop andrun_analysis_complete_callbacks()into the analysis handoff to support custom keyboard shortcuts and post-analysis automation safely on the main thread.example_plugin.luabuilt into the output directory as a working reference.