Skip to content

iruizr7/ruscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RuScan

Simple SANE scanning desktop app (GTK4) with fast previews and one-click PDF export — more sanity than XSane and Skanlite.

Crates.io GitHub Repo Rust 2024 Edition GTK4 SANE Stars


What it does

  • Discovers SANE scanners and lets you scan pages at a selected DPI.
  • Shows scanned pages in a clean list / grid view with adjustable preview size.
  • Exports all scanned pages into a single PDF (JPEG-compressed, sized from the scan DPI).

Why RuScan (and why not XSane / Skanlite)

This project exists because I wanted a “day-to-day” scanning workflow (receipts, letters, forms) that is fast, predictable, and produces reasonably small PDFs without spending time tweaking settings.

In my experience with XSane and Skanlite:

  • The default output can be way too large for everyday use (huge PDFs/images that are annoying to email, archive, or share).
  • Getting good results can feel like an exercise in option-hunting (many knobs, inconsistent defaults, and lots of trial-and-error).
  • XSane in particular can be complex and error-prone: it’s powerful, but it’s easy to end up with the wrong mode/output, or to hit workflows that don’t feel robust.

RuScan focuses on a small set of features that I personally use all the time:

  • Scan pages, see them immediately, repeat.
  • Export a single PDF with sane compression defaults for documents.

Install

1) System dependencies

RuScan is a GTK4 desktop app and uses SANE for scanning. You’ll need:

  • GTK4 runtime + development files
  • SANE runtime (libsane) and (optionally) SANE tools for debugging

Examples:

  • Ubuntu/Debian:
    • sudo apt-get install -y libsane1 sane-utils libgtk-4-1 libgtk-4-dev pkg-config
  • Fedora:
    • sudo dnf install -y sane-backends sane-backends-drivers sane-frontends gtk4 gtk4-devel pkgconf-pkg-config
  • Arch:
    • sudo pacman -S --needed sane gtk4 pkgconf

2) Install RuScan

From crates.io:

cargo install ruscan

From Git (if you want the latest main):

cargo install --git https://github.com/iruizr7/ruscan.git --bin ruscan

Local dev install:

cargo install --path .

Usage

  1. Launch ruscan.
  2. Refresh and select a scanner device.
  3. Choose a DPI and click Add page (Scan).
  4. Repeat as needed, then click the PDF button to export.

Tips:

  • Run with logs:
    • RUST_LOG=info ruscan
    • RUST_LOG=debug ruscan (more detail)
  • If no scanner shows up, verify SANE sees it:
    • scanimage -L

Development

Run the app:

cargo run

Common checks:

cargo fmt
cargo clippy
cargo test

Troubleshooting

  • No devices found
    • Confirm SANE works: scanimage -L
    • Check permissions (udev rules / group membership) for your scanner device.
  • Wayland/X11 issues
    • Try launching from a terminal to see GTK warnings/errors.

Built with

  • Relm4 (GTK4 UI framework for Rust)
  • SANE (loaded dynamically via libsane.so)

License

MIT License. See LICENSE.

About

Simple SANE Scanning Cross-Platform Desktop app, more sanity than XSane and Skanlite!

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages