Back to Home

SerialRUN Plugins

Extend SerialRUN with custom functionality. Develop plugins in Rust with full access to serial ports, UI, and more.

Current Status

LOCAL IMPORT COMMUNITY SOON

Plugin local import is fully functional. Import .zip packages directly into SerialRUN. Community marketplace coming in a future release — developers are welcome to build and share plugins now!

Plugin Capabilities

🔌 SerialPort

Read and write to serial ports. Full access to TX/RX with HEX and text modes.

🖥️ UiPanel

Dedicated UI panel with custom controls, inputs, and real-time display.

📁 FileDialog

Open file picker for loading firmware, configurations, or export data.

📊 Progress

Progress bar with status text for long operations like firmware flashing.

📝 Logging

Write to SerialRUN's log system. Users can see plugin activity in the log viewer.

⚡ Commands

Generic command panel for text-based interactions. No custom UI needed.

Quick Start

  1. Create Plugin Project

    # Create a new Rust library cargo new --lib my-plugin cd my-plugin
  2. Configure Cargo.toml

    [lib] crate-type = ["cdylib"] [dependencies] serialrun-plugin-api = "0.2" serde = { version = "1", features = ["derive"] } serde_json = "1"
  3. Implement Plugin FFI

    use std::ffi::{CStr, CString}; use std::os::raw::c_char; // Required: return plugin metadata #[no_mangle] pub extern "C" fn plugin_get_info() -> *mut c_char { let info = serde_json::json!({ "name": "my-plugin", "version": "1.0.0", "description": "My awesome plugin", "author": "Your Name" }); CString::new(info.to_string()).unwrap().into_raw() } // Required: return available commands #[no_mangle] pub extern "C" fn plugin_get_commands() -> *mut c_char { /* ... */ } // Required: execute a command #[no_mangle] pub extern "C" fn plugin_execute( command: *const c_char, params: *const c_char, callbacks: *const PluginCallbacks, ) -> *mut c_char { /* ... */ }
  4. Build & Package

    # Build for release cargo build --release # Create plugin.zip with: # - target/release/my_plugin.dll (or .so / .dylib) # - plugin.json (manifest)
  5. Import into SerialRUN

    Open SerialRUN → Plugins panel → Import ZIP → Select your plugin.zip. The plugin will be discovered and ready to use.

Plugin Manifest (plugin.json)

Every plugin needs a plugin.json file in the ZIP package:

{ "name": "my-plugin", "version": "1.0.0", "description": "What this plugin does", "author": "Your Name", "min_serialrun_version": "0.2.0", "platforms": ["windows", "macos", "linux"], "tags": ["modbus", "industrial"], "usage": "How to use this plugin..." }

Example Plugins

serialrun-example-plugin

Minimal plugin example with all FFI functions. Great starting point for new plugins.

View Source →

serialrun-stc-isp

STC MCU ISP flasher plugin. Full-featured with chip detection, firmware loading, and progress tracking.

View Source →

Documentation