imgforge targets Linux and macOS. It also runs inside containers built from Debian- or Alpine-based images as long as libvips is available. Windows development is possible through WSL2.
Before running the server, confirm that libvips can load dynamic modules:
ldd target/release/imgforge | grep vips
If libvips is marked as “not found,” add its library directory to LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (macOS) or install the runtime package (e.g. libvips).
imgforge ships as both an HTTP server and a Rust crate, so you can embed the processing engine without starting the Axum server:
use imgforge::{config::Config, Imgforge};#[tokio::main]async fn main() -> anyhow::Result<()> { // Provide your HMAC key and salt (hex encoded, truncated for brevity) let mut config = Config::with_hex_keys("deadbeef", "cafebabe")?; config.allow_unsigned = true; // Optional: configure caches programmatically with CacheConfig let imgforge = Imgforge::new(config, None).await?; let result = imgforge .process_path("unsafe/resize:fit:300:300/plain/https://example.com/image.jpg") .await?; std::fs::write("resized.jpg", result.bytes)?; Ok(())}
The same API exposes metadata through image_info and accepts signed paths exactly as the HTTP interface does.