MediaCleaner Pro is a Cargo workspace written in Rust. Building from source produces a single self-contained native binary that embeds the frontend assets, the SQLite engine, and all processing logic — no separate runtime or service is required. The steps below assume you have a working Rust toolchain; everything else is handled by Cargo.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xcoder-es/media-cleaner-pro/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Rust 1.75 or later — install via rustup.rs. Run
rustup update stableto make sure you are on a recent stable release. - Node.js 18+ (optional) — only needed if you want to rebuild the browser UI from its source. If Node.js is not available, a fully-functional placeholder frontend is compiled in automatically.
Building
Build in release mode
mc-core and mc-infra), and links the final binary. The release profile applies maximum optimisations (see Release profile below), so the first build takes a few minutes.Optional: Rebuilding the Frontend
The browser UI lives in thefrontend/ directory. When frontend/dist/ is present at compile time, rust-embed bakes those assets directly into the binary. If the directory is absent, build.rs checks for bun first, then falls back to npm. If neither is found, it writes a minimal single-file placeholder UI into frontend/dist/ and continues the build — so Node.js is never a hard requirement.
To build and embed the full UI yourself:
target/release/mediacleaner-pro serves the full production frontend from memory without touching the filesystem.
Cargo Features
The workspaceCargo.toml defines two optional feature flags. No optional features are enabled in the default build.
| Feature | Description | How to enable |
|---|---|---|
supabase | Enables Supabase integration. Pulls in reqwest 0.12 as an HTTP client for talking to Supabase REST and Auth endpoints. | --features supabase |
cloud | Reserved placeholder for future cloud/SaaS features. Enables no additional code today. | --features cloud |
Workspace Structure
The repository is a Cargo workspace with three members:mediacleaner-pro (root)
Main binary crate. Contains the Axum HTTP server, API routes, SSE progress streaming, the streaming pipeline runner, the job state machine, and the Temporal client integration.
packages/mc-core
Domain library. Pure Rust — no filesystem access, no network I/O. Defines all domain types, port traits, the
PipelineStage interface, and the 10-stage processor logic as pure functions.packages/mc-infra
Adapter library. Provides concrete implementations of every port trait: local filesystem via
tokio::fs, SHA-256 via sha2, dHash via the image crate, SQLite via rusqlite, recursive file scanning via walkdir, and the in-process notification bus.Key Dependencies
The table below lists the most significant dependencies declared in the rootCargo.toml.
| Crate | Version | Role |
|---|---|---|
axum | 0.7 | Async HTTP server and router (with WebSocket feature enabled) |
tokio | 1.38 | Async runtime (full feature: all executors, timers, channels, fs) |
image | 0.25 | Image decoding — jpeg, png, bmp, webp, gif |
rayon | 1.10 | Data-parallel CPU work; pipeline CPU stages run off the async scheduler via tokio::task::block_in_place |
sha2 | 0.10 | SHA-256 exact-duplicate hashing |
rusqlite | 0.31 | SQLite with the bundled feature — no system SQLite required |
utoipa | 5 | Derives OpenAPI 3.1 specs directly from Axum handler types |
rust-embed | 8 | Embeds frontend/dist/ assets into the binary at compile time |
Release Profile
The release profile inCargo.toml is configured for maximum single-binary performance:
lto = true enables link-time optimisation across all crates in the workspace. codegen-units = 1 forces a single code-generation unit, giving LLVM the full picture for inlining decisions. strip = true removes debug symbols from the output, keeping the binary compact.