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 SOONPlugin 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
-
Create Plugin Project
# Create a new Rust library cargo new --lib my-plugin cd my-plugin -
Configure Cargo.toml
[lib] crate-type = ["cdylib"] [dependencies] serialrun-plugin-api = "0.2" serde = { version = "1", features = ["derive"] } serde_json = "1" -
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 { /* ... */ } -
Build & Package
# Build for release cargo build --release # Create plugin.zip with: # - target/release/my_plugin.dll (or .so / .dylib) # - plugin.json (manifest) -
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:
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
- Full Plugin Development Guide — Complete reference for all FFI functions, callbacks, and capabilities
- Plugin Specification — Technical spec for the plugin ABI and manifest format
- Plugin User Guide — How to install, enable, and manage plugins in SerialRUN