Skip to content

Repository files navigation

Image Processing CLI

An image processing tool in Rust with a dynamically loaded plugin architecture: plugins are compiled as separate shared libraries (.so / .dll) and loaded at runtime, so new effects can be added without recompiling the host application.

Highlights:

  • Runtime plugin loading via dynamic libraries — cross-platform (.so on Linux, .dll on Windows)
  • Stable plugin ABI between the host CLI and independently compiled plugins
  • Parameterized plugins: settings are passed from external files at load time
  • Example plugins included (blur, mirror) as templates for writing new ones

Stack: Rust · Dynamic loading / FFI · CLI (Clap)

Workspace Structure

  • image-processor - CLI that loads a plugin and applies it to an input image.
  • blur-plugin - Example blur plugin.
  • mirror-plugin - Example mirror plugin.
  • plugin-parameters - Sample parameter files for the plugins.

Requirements

  • Rust toolchain (2024 edition)
  • Supported image format: png

Quick start

cargo build -p blur-plugin
cargo build -p mirror-plugin

cargo run -p image-processor -- \
  --input images/input/photo.png \
  --output images/output/photo.png \
  --plugin libblur_plugin \
  --params plugin-parameters/blur.txt

Notes

  • Plugins are loaded from target/debug by default; override with --plugin-path.
  • Plugin name can be passed without extension; the CLI appends .so on Linux and .dll on Windows.
  • Parameters are read from a text file and passed to the plugin as a UTF-8 string.

About

Rust image processing CLI with runtime-loaded plugins (.so/.dll)

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages