Repository navigation
Plugins
Plugins extend GridLock with custom inspection tools, solver-specific visualizations, custom menus, status-bar indicators, source annotations, and structured report tabs without modifying the core application. You can install plugins directly from Git repositories inside Preferences -> Plugins, declare a reproducible plugin list in plugins.toml, scaffold a new plugin with scripts/init_plugin.lua, or drop pre-built plugin files into your global or project plugin folder.
Tip
Building your own solver or mesh extension? Run lua scripts/init_plugin.lua to generate a ready-to-build C++23 or C99 plugin project in seconds, see Plugin Authoring, UI Surfaces & Build Recipes, or read Why a Versioned C ABI Instead of Lua? for the architectural rationale behind GridLock's native gridlock_plugin_init_v1 contract.
GridLock uses a decentralized distribution model so teams and scientific computing communities can publish plugins on any Git server:
-
gridlock-pluginRepository Topic: Browse community extensions tagged withgridlock-pluginon GitHub (https://github.com/topics/gridlock-plugin), GitLab, Codeberg, or institutional Gitea instances. -
Curated
awesome-gridlockLists: Community-maintainedawesome-gridlockindexes catalog plugins by scientific domain (for example, PETSc/Trilinos vector and matrix viewers, Kokkos field inspectors, STL container viewers, mesh refinement exporters, and MPI rank health monitors). -
Supported Git Hosts & Shorthand Formats:
-
GitHub (
github.com): Shorthandowner/repoorgithub:owner/repo -
GitLab (
gitlab.com): Shorthandowner/repo, nested subgroupsgroup/subgroup/repo(2..8path segments), orgitlab:group/subgroup/repo -
Codeberg (
codeberg.org): Shorthandowner/repoorcodeberg:owner/repo -
Gitea & Self-Hosted Git Servers: Any
https://<host>[:<port>]/<path>.gitorgit@<host>:<path>.gitrepository URL
-
GitHub (
To clone, build, verify, and install a plugin from source inside GridLock:
- Open Edit -> Preferences (or press
Ctrl+,) and select Plugins in the left category tree. - Switch to the Install from Git tab (
#pluginInstallTab). - Choose the source forge in Git Host (
#pluginGitHostCombo):- GitHub (
github.com) - GitLab (
gitlab.com) - Codeberg (
codeberg.org) - Custom Git URL (
https:///git@)
- GitHub (
- Enter the repository in Git Host & Repository (
#pluginGitRepoEdit):- For GitHub, GitLab, or Codeberg, enter compact shorthand such as
bnorthern42/gridlock-stl-inspector(or paste an explicitgithub:,gitlab:,codeberg:,https://, orgit@URL, which GridLock honors regardless of the selected dropdown item). - For Custom Git URL, enter a complete HTTPS or SSH repository address such as
https://gitea.example.org/lab/mesh-inspector.gitorgit@gitea.example.org:lab/mesh-inspector.git.
- For GitHub, GitLab, or Codeberg, enter compact shorthand such as
-
(Optional) Enter a branch name, release tag, or commit hash in Optional branch/tag... (
#pluginGithubRefEdit, for examplemainorv1.2.0). Leave it blank to build the repository's default branch. - Select the target Install Scope (
#pluginInstallScopeCombo):-
Global (
~/.config/gridlock/plugins): Makes the plugin available across all projects for your user account. -
This Workspace (
<workspace>/.gridlock/plugins): Installs the plugin only for the currently open project folder and automatically recordsSHA-256trust approval for the built binary.
-
Global (
- Click Install (
#pluginCloneAndBuildBtn, which toggles to Cancel while a build is active).- GridLock clones the repository into an isolated temporary staging folder, detects the build system (
meson.build,CMakeLists.txt,Makefile, or standalone C99/C++23 sources), compiles the plugin, and runs an isolated post-build conformance check (PluginVerifier) before installing the binary atomically. - Live compiler output streams with semantic color highlighting:
#38bdf8for==>pipeline stage headers,#f59e0bfor compiler warnings, and#ef4444for compiler, linker, or conformance errors.
- GridLock clones the repository into an isolated temporary staging folder, detects the build system (
- When installation finishes, click Hot-Reload Now (
#pluginHotReloadBtn) on the#d97706notification banner to activate the plugin immediately without closing your open workspace or active paused MPI debug session, or click Restart GridLock Now for a full application restart.
Instead of installing plugins one by one on every workstation, you can declare your plugin list in plugins.toml and synchronize everything with a single click.
| Scope | Manifest Path | Installed Binary Folder | Purpose |
|---|---|---|---|
| User Global | ~/.config/gridlock/plugins.toml |
~/.config/gridlock/plugins/ |
Personal plugins shared across every project on your machine. |
| Workspace | <workspace>/.gridlock/plugins.toml |
<workspace>/.gridlock/plugins/ |
Project-specific plugins version-controlled alongside solver source code. |
# Global (~/.config/gridlock/plugins.toml) or Workspace (<workspace>/.gridlock/plugins.toml)
[[plugins]]
repo = "bnorthern42/gridlock-stl-inspector"
ref = "main"
build = "auto"
enabled = true
[[plugins]]
repo = "gitlab:hpc-tools/mpi/mesh-inspector"
ref = "v1.2.0"
build = "meson"
[[plugins]]
repo = "codeberg:scicomp/kokkos-field-view"
build = "cmake"
[[plugins]]
repo = "https://gitea.example.org/team/custom-solver-probe.git"
ref = "9f13365"
build = "make"
enabled = false| Field | Required | Default | Description |
|---|---|---|---|
repo |
Yes | None |
owner/repo (GitHub), github:owner/repo, gitlab:group/sub/repo, codeberg:owner/repo, or any https:// / git@ Git URL. |
ref |
No | Remote default branch | Branch name, release tag, or 7 to 40 character commit hash. |
build |
No | "auto" |
"auto", "meson", "cmake", "make", or "single". |
enabled |
No | true |
Set to false to skip this entry during Sync plugins.toml without deleting it from the file. |
-
Open
plugins.toml(#pluginOpenManifestBtn): In Preferences -> Plugins -> Install from Git, select Global or This Workspace and click Openplugins.toml. GridLock creates a starter template if the file does not exist yet and opens it directly in the source editor. -
Automatic Recording: Installing a plugin via Install automatically adds or updates its
[[plugins]]entry in the selected scope'splugins.toml. -
Sync
plugins.toml(#pluginSyncManifestBtn): Clicking Syncplugins.tomlchecks every enabled entry against~/.config/gridlock/plugins-lock.tomland remote Git commits (git ls-remote), builds and verifies only missing or outdated plugins sequentially, and shows the Hot-Reload Now / Restart GridLock Now banner when binaries were built or updated.
Important
GridLock writes resolved 40-character Git commit hashes (commit_sha) and binary SHA-256 checksums (binary_sha256) exclusively to your user-global ~/.config/gridlock/plugins-lock.toml. Lockfile entries are never read from an untrusted workspace directory.
The Preferences -> Plugins -> Installed tab (#pluginInstalledTab) displays every discovered plugin in an 8-column table (#pluginsTableWidget): Global, Workspace, Name, Version, Scope / ABI, Status, Trust, and Update.
-
Version (<commit_short>)& Provenance Tooltip: The Version column pairs each plugin's declared semantic version (plugin_version_utf8) with its 7-character Git commit hash from~/.config/gridlock/plugins-lock.toml(for example,0.1.0 (a1b2c3d), or-/0.1.0for local manually placed binaries). Hovering any cell displays the canonical path, fullSHA-256digest, Git repository URL, ref, and 40-character commit SHA. -
Toolbar Controls: Use Plugin Directories (
#pluginSearchDirsCombo) + Open Folder (#openPluginFolderBtn) to inspect~/.config/gridlock/pluginsor<workspace>/.gridlock/plugins, Reload Plugins (#reloadPluginsBtn) to rescan directories, and Update All (#pluginUpdateAllBtn) to update every Git-backed plugin.
-
Per-Row
Update(#pluginUpdateBtn_<id>) & ToolbarUpdate All(#pluginUpdateAllBtn): Click Update on any Git-installed plugin row or Update All in the toolbar to re-clone, rebuild, verify, and atomically replace the binary in its existing Global or Workspace scope (preserving previously granted Workspace trust). Local binaries without a Git source show a disabled Update button with aLocal binary (no Git source)tooltip. -
Hot-Reload Now (
#pluginHotReloadBtn): After installing, updating, syncingplugins.toml, or applying checkbox/trust changes, click Hot-Reload Now on the banner (shown in both Preferences -> Plugins and the main window#mainWindowPluginRestartBanner). GridLock cleanly unloads previous plugin handles, loads updated.so/.dylib/.dllbinaries from disk, refreshes menus, status badges, annotations, and report panels, and replayson_session_start(rankCount)onto newly loaded plugins so paused multi-rank MPI debug sessions continue uninterrupted.
Warning
Linux STB_GNU_UNIQUE Fallback Notice: On Linux (glibc), C++ plugins compiled without -Wl,--version-script (or -fno-gnu-unique) may export STB_GNU_UNIQUE ('u') dynamic symbols that cause dlclose() to keep old code pages pinned in process memory until exit. If GridLock detects STB_GNU_UNIQUE symbols (or an active plugin callback frame on the call stack) when you click Hot-Reload Now, it displays an explicit warning banner prompting you to click Restart GridLock Now so the updated binary loads into a fresh process address space. Plugins scaffolded with lua scripts/init_plugin.lua include plugin.map by default so hot-reloading always unmaps cleanly.
- Toggling Global (
#pluginGlobalCheck_<id>), Workspace (#pluginWorkspaceCheck_<id>), or Trust & Approve (#pluginTrustBtn_<id>) stages your changes in memory and updates the Status preview (Staged: ... (Apply to save)) without modifying configuration files immediately. - Clicking Cancel discards all staged changes.
- Clicking Apply or OK saves your changes to
~/.config/gridlock/config.tomland displays the Hot-Reload Now / Restart GridLock Now banner.
A plugin is active only when both its Global and Workspace checkboxes are checked and (for workspace plugins) its binary is Trusted:
| Plugin Origin | Global Checked | Workspace Checked | Workspace Binary Trusted | Effective State |
|---|---|---|---|---|
Global (~/.config/gridlock/plugins/) |
Yes | Yes | Not applicable (User Global) | Loaded |
Global (~/.config/gridlock/plugins/) |
Yes | No | Not applicable (User Global) | Disabled (Workspace) (active in other workspaces) |
Global (~/.config/gridlock/plugins/) |
No | Yes or No | Not applicable (User Global) | Disabled (Global) (inactive everywhere) |
Workspace (<workspace>/.gridlock/plugins/) |
Yes | Yes | Yes | Loaded |
Workspace (<workspace>/.gridlock/plugins/) |
Yes | Yes | No | Untrusted Workspace Plugin (Approval Required) |
Workspace (<workspace>/.gridlock/plugins/) |
Yes | No | Yes | Disabled (Workspace) |
Workspace (<workspace>/.gridlock/plugins/) |
No | Yes or No | Yes or No | Disabled (Global) |
Switching projects via File -> Open Workspace / Folder automatically re-evaluates workspace enablement and workspace plugins for the newly opened folder.
Caution
Opening an untrusted repository downloaded from the internet never executes code from <workspace>/.gridlock/plugins/ or <workspace>/.gridlock/plugins.toml. Review workspace plugin sources before clicking Trust & Approve or running Sync plugins.toml under This Workspace.
GridLock enforces three safeguards on workspace-scoped plugins:
-
Zero Automatic Execution Prior to Trust: Untrusted shared libraries inside
<workspace>/.gridlock/plugins/are hashed beforedlopen(), so even C++ static constructors (.init_array) cannot run until you explicitly approve the binary. Likewise,<workspace>/.gridlock/plugins.tomlruns only when you explicitly select This Workspace and click Syncplugins.toml. -
User-Owned Trust Registry (
config.toml): When you click Trust & Approve () and Apply (or build a workspace plugin yourself via Install / Syncplugins.toml), GridLock stores the canonical file path and 64-character lowercaseSHA-256fingerprint in your personal~/.config/gridlock/config.tomlunder[plugins.trusted_workspace_binaries]. -
Automatic Tamper Detection: Before loading any workspace plugin, GridLock recomputes its
SHA-256checksum. Modifying or replacing a binary by even a single byte invalidates trust immediately until you review and approve the new fingerprint.
Depending on what a plugin provides, its features integrate into six areas of the GridLock interface:
- Tools -> Plugins Menu: Top-level commands and nested submenus up to 4 levels deep (for example, Tools -> Plugins -> Mesh Tools -> Refinement -> Export VTK). Built-in GridLock keyboard shortcuts always take precedence if a plugin suggests a conflicting keybinding.
-
Right-Click
Plugin ActionsMenus: Context-sensitive actions appear under Plugin Actions when right-clicking rows or lines across all 5 surfaces:-
Variables dock (matched against variable C/C++ types such as
PetscVec,std::vector<double>, orKokkos::View<double**>) -
Source Editor (matched against the variable expression under the cursor, its resolved DWARF type when paused, or selected text, ignoring C++ member function calls like
obj.method(...)) - Call Stack dock (stack frames)
- Breakpoint Gutter (right-clicking the editor line-number margin)
- Server Rack / Rank List view (individual MPI rank cards)
-
Variables dock (matched against variable C/C++ types such as
-
Status-Bar Badges: Clickable status pills on the bottom status bar styled with theme tokens (
accent#38bdf8,warning#f59e0b,error#ef4444, or custom#RRGGBBhex codes). - Inline Source Annotations: Colored line highlights, inline pill badges, and hover tooltips inside the source editor.
-
Plugin Reports Dock: Closable structured tabs rendering Markdown summaries, two-column key-value tables, or expandable JSON trees. Plugins also inspect C/C++ contiguous containers (
T[N],std::array,std::vector,std::span,std::valarray) via zero-call DWARF introspection without polluting your Evaluator tab history.
Before copying a pre-compiled plugin into a plugin folder or publishing a release in CI, run GridLock's isolated conformance verifier from the terminal:
gridlock --verify-plugin /path/to/libmy_plugin.soNote
gridlock --verify-plugin <path.so> runs headlessly inside a temporary sandbox without opening a window or touching ~/.config/gridlock/. It validates dynamic symbol hygiene (gridlock_plugin_init_v1 visibility and STB_GNU_UNIQUE checks), ABI v1.0 descriptor headers, menu/regex registrations, dry-run session lifecycle hooks, and zero leaked alloc_bytes allocations (exit 0 on [PASS], exit 1 on [FAIL]).
To scaffold a new out-of-tree plugin repository with build files, plugin.map symbol hiding, and starter UI hooks, run lua scripts/init_plugin.lua (see Plugin Authoring, UI Surfaces & Build Recipes).
To install a pre-compiled plugin manually (.so on Linux, .dylib on macOS, .dll on Windows):
- Open Preferences -> Plugins -> Installed, choose the target folder in Plugin Directories, and click Open Folder.
- Copy the regular shared-library file into
~/.config/gridlock/plugins/(Global) or<workspace>/.gridlock/plugins/(Workspace). Do not use symbolic links pointing outside the plugin directory, and ensure neither the directory nor the file is world-writable (chmod 755orchmod 644). - Click Reload Plugins (and Trust & Approve -> Apply -> Hot-Reload Now if placed inside a workspace folder).
Status Shown in Preferences -> Plugins
|
Cause | Resolution |
|---|---|---|
Loaded |
Plugin passed verification and is active in the current session. | None required. |
Disabled (Global) |
Unchecked in the Global column ([plugins] disabled_ids). |
Check Global, click Apply, and click Hot-Reload Now. |
Disabled (Workspace) |
Unchecked in the Workspace column for the open project. | Check Workspace, click Apply, and click Hot-Reload Now. |
Restart Required |
Enablement, trust, or binary installation changed during this session. | Click Hot-Reload Now to reload in-place, or Restart GridLock Now if prompted by an STB_GNU_UNIQUE pinned-symbol warning. |
Untrusted Workspace Plugin (Approval Required) |
New or modified binary in <workspace>/.gridlock/plugins/ has no matching SHA-256 entry in ~/.config/gridlock/config.toml. |
Verify the binary comes from a trusted source, click Trust & Approve (), click Apply, and click Hot-Reload Now. |
ABI Rejected: vX.Y / ABI Rejected: invalid
|
Plugin failed version, descriptor, or entry-point validation. | Run gridlock --verify-plugin <path> for detailed diagnostics, or click Update / Install to rebuild against the current GridLock release. |
ABI Rejected: Duplicate plugin ID... |
Two plugin files export the same unique plugin identifier (for example, installed in both Global and Workspace folders). | Remove the duplicate .so/.dylib/.dll from one of the plugin directories and click Reload Plugins. |
ABI Rejected: Rejected symlink escaping plugin directory |
The plugin file is a symbolic link resolving outside the plugin folder. | Replace the symlink with a regular file copy inside the plugin folder. |
ABI Rejected: Rejected world-writable plugin binary |
File or directory permissions allow arbitrary local users to modify the binary (o+w). |
Restrict permissions with chmod go-w <path> and click Reload Plugins. |
GridLock Repository | Releases | Report an Issue | Roadmap | Accessibility | License (MIT)
Documentation mirrored from docs/ on master.
Getting Started & Tutorials
Debugging Workflows
- UI & Debugging Manual
- Server Rack View
- MPI Diagnostics & HPC
- OpenMP OMPD Inspector
- Memory, RE & Profiling
- Struct Layout & Cache Lines
- Reference Manual & Packages
Customization & Reference
- Configuration & Themes
- Keyboard Shortcuts
- GDB Reference & Cheat Sheet
- Screenshot Gallery
- Engineering Roadmap
Extending & Architecture