Skip to content

Dual GUI Guide

Andrew Paolucci edited this page Nov 19, 2026 · 1 revision

Dual-GUI Guide (robocopy2rust-win32 & robocopy2rust-iced)

robocopy2rust ships two first-class, 100% pure-Rust desktop consoles built directly atop robocopy2rust-core, robocopy2rust-runner, and robocopy2rust-report.


Launching the Desktop Consoles

Running robocopy2rust with no subcommand—or running robocopy2rust gui—selects the appropriate binary automatically via launch_gui in crates/robocopy2rust-cli/src/main.rs:

Invocation Windows Behavior Linux / macOS Behavior
robocopy2rust (no args) Launches robocopy2rust-win32.exe (falls back to robocopy2rust-iced.exe only if win32 isn't present and iced is) Launches robocopy2rust-iced
robocopy2rust gui Same as above (Win32 default) Launches robocopy2rust-iced
robocopy2rust gui --iced Launches robocopy2rust-iced.exe (matching cross-platform UI) Launches robocopy2rust-iced
robocopy2rust-win32.exe Launches native WinSafe Win32 GUI directly Prints guidance error directing to robocopy2rust-iced
robocopy2rust-iced (.exe) Launches cross-platform Iced GUI directly Launches cross-platform Iced GUI directly

Shared Startup Flags (Both GUIs)

Both robocopy2rust-win32 and robocopy2rust-iced support pre-populating a job from CLI flags or file associations:

robocopy2rust-win32.exe --source "C:\Data" --dest "D:\Backup"
robocopy2rust-win32.exe --rcj nightly.rcj
robocopy2rust-iced.exe --profile "Nightly Docs"
robocopy2rust gui --iced --source "C:\Data" --dest "D:\Backup"

Passing a positional *.rcj file path (myjob.rcj) is also recognized directly. Both GUI binaries compile with #![cfg_attr(all(windows, not(debug_assertions)), windows_subsystem = "windows")] so release launches never open an unwanted background console window (while still writing --help output cleanly when piped).


1. Native Windows Console: robocopy2rust-win32 (WinSafe 0.0.29)

Engineered specifically for Windows desktops, elevated Administrator sessions, VMs, and Windows Server over RDP where OpenGL/Vulkan/DirectX drivers may be unavailable.

Technical Highlights

  • Zero-GPU Architecture: Built directly on real Win32 HWND Common Controls (WindowMain, HMENU, Tab, TabPage, Edit, CheckBox, ComboBox, Button, ListView, ProgressBar, StatusBar)—zero custom GPU shaders, zero WebView2, zero external DLLs.
  • Manifest & DPI Support (app.manifest, build.rs):
    • Links Microsoft.Windows.Common-Controls v6 (6.0.0.0) for native Windows visual styles.
    • Declares <dpiAwareness>PerMonitorV2</dpiAwareness> (plus <dpiAware>true/pm</dpiAware>).
    • Embedded cleanly on both MSVC (/MANIFEST:EMBED + /MANIFESTINPUT:app.manifest) and GNU/MinGW (app.rc compiled with x86_64-w64-mingw32-windres or windres).
  • Native Vista+ COM Dialogs (win32_dialogs.rs): Folder and open/save pickers use COM IFileOpenDialog (FOS::PICKFOLDERS / FOS::FILEMUSTEXIST) and IFileSaveDialog (FOS::OVERWRITEPROMPT), paired with arboard for clipboard command copy.
  • Menu Bar (HMENU) & Top Target Toolbar:
    • &File: Import .rcj, Export .rcj, Export .bat, Export .ps1, Export Last Run HTML Report, Export Last Run Bundle (all), Exit.
    • &Job: Reset Default Job, Swap Source <-> Destination, Copy Command Line, Save Profile, Add Current Job to Batch Queue.
    • &Execution: Dry-Run Preview (/L), Execute Job, Stop Active Job.
    • &Help: About Robocopy2Rust Win32.
  • 7 Native TabPage Views:
    1. Designer & Diagnostics — Job name/description, preset selector & apply, command-line importer, profile load/save/delete, schtasks generator, and validation diagnostics ListView.
    2. Copy & Transfer — Traversal, /COPY://DCOPY: flags, /MT:1..128, restart/backup (/Z//B//ZB//J//EFSRAW), /MIR//PURGE//MOV//MOVE, attributes, Windows 10/11 switches (/COMPRESS, /SPARSE:Y|N, /NOCLONE, /NOOFFLOAD).
    3. File Selection — /XF, /XD, /IA:, /XA:, /XC//XN//XO//XX//XL, /IS//IT//IM, size & age bounds, /FFT, /DST, /XJ//XJD//XJF.
    4. Throttle & Retry — /R, /W, /REG, /TBD, /LFSM[:floor], /IoMaxSize, /IoRate, /Threshold, /IPG, /MON, /MOT, /RH, /PF.
    5. Logging & Jobs — /L, /V, /X, /TS, /FP, /BYTES, /NS//NC//NFL//NDL//NP//ETA, /LOG://LOG+://UNILOG://UNILOG+:, /TEE, /NJH//NJS//UNICODE, /JOB, /SAVE, /QUIT, /NOSD, /NODD.
    6. Live Console & Diff — Real-time ProgressBar, summary counters, action filter combo (All, Copied/New, Extra, Skipped, Errors), parsed ListView, raw log buffer (MAX_LOG_LINES = 25_000), and HTML/Bundle report export buttons.
    7. Batch & History — Multi-job sequential queue with Dry-Run and Stop on Error (exit >= 8) controls plus persistent Run History ListView.
  • Responsive UI Thread Relay: Worker execution streams events via mpsc, marshaling batched UI updates back onto the Win32 message loop using wnd.run_ui_thread(...) with atomic cancellation support (CancelToken).
  • Destructive Safety Prompt: Uses native OS MessageBox confirmation whenever /MIR, /PURGE, /MOVE, or /MOV is active without /L.

2. Cross-Platform Console: robocopy2rust-iced (Iced 0.14)

Consistent, modern retained-mode UI built on Elm MVU (App::new, App::update, App::view, App::subscription) for Linux, macOS, and Windows.

Technical Highlights

  • Renderer Resilience (wgpu + tiny-skia): Uses hardware-accelerated wgpu by default and includes Iced's tiny-skia CPU software rasterizer fallback automatically if GPU drivers are missing or disabled (ICED_BACKEND=tiny-skia).
  • Light & Dark Themes: Instant one-click Light / Dark theme toggle (Theme::Light / Theme::Dark) in the top toolbar.
  • Window & Polling Model: Starts centered at 1360x840; stays idle at near-0% CPU when not running (Subscription::none()), enabling an active iced::time::every(60ms) runner-poll tick only while a job is executing. Keeps up to MAX_LOG_BUFFER_LINES = 50_000 lines in the live console ring buffer.
  • Layout Structure:
    • Left Sidebar (255 px): 8 workspace tab selectors, built-in preset cards, saved profiles list, and live validation error/warning badge summary.
    • Top Target Toolbar: Source/Destination pickers (rfd native OS dialogs), Swap, Dry-Run (/L), Execute, Queue +, Stop, and Light/Dark theme switch.
    • 8 WorkspaceTab Views: Job Designer, Copy & Transfer, File Selection, Throttle & Retry, Logging & Jobs, Live Console & Diff, Batch Queue, and History & Reports.
    • Bottom Command & Status Bars: Monospace read-only live command preview, Copy, Import..., .rcj, .bat, .ps1, Schedule..., Exit Codes, validation status, progress %, and Iced 0.14 (wgpu + tiny-skia fallback) indicator.
  • 6 In-App Modal Overlays (ActiveModal):
    • ConfirmDestructive — Explicit confirmation dialog naming active /MIR//PURGE//MOVE//MOV flags and offering a one-click Run Dry-Run (/L) Instead action.
    • ImportCommand — Paste any raw robocopy ... string and parse it directly into GUI controls.
    • SaveProfile — Name and save/update jobs in profiles.json.
    • TaskScheduler — Generate schtasks /Create commands (Daily, Weekly, Hourly, OnStart, OnLogon, /RL HIGHEST).
    • ExitCodeReference — Interactive exit-code tester (0..=16) showing bitmask breakdown.
    • About — Version, stack, and safety notes.

Feature Parity Matrix

Capability robocopy2rust-win32 (WinSafe) robocopy2rust-iced (Iced 0.14)
Target OS Support Windows only Linux, macOS, Windows
GPU / RDP Requirement None (native GDI/ComCtl v6) wgpu + tiny-skia CPU fallback
All Windows 10/11 Switches Full parity Full parity
8 Presets (Path-Preserving) Yes Yes
Command / .rcj Bidirectional Import Yes Yes
Profiles & 200-Entry Run History Yes (shared ProfileStore) Yes (shared ProfileStore)
Batch Queue & Stop-on-Error Yes Yes
Live \r Progress & Filtered Diff Yes Yes
.rcj / .bat / .ps1 / schtasks Exports Yes Yes
Offline HTML / JSON / MD Reports Yes Yes
Native Theme Support Native OS Windows Theme Built-in Light / Dark Toggle
Destructive Run Confirmation Guard Native Win32 MessageBox In-app Modal + Dry-Run Switch
Binary Size (Windows Release) ~2.78 MiB ~10.72 MiB

Clone this wiki locally