Skip to content

GreedyLabs/GreedyDots

Repository files navigation

GreedyDots

Image → pixel art converter. Rust engine with Metal-accelerated GPU path, Tauri 2 desktop app, SolidJS frontend. Targets game-style chunky pixel output.

Status: M0 scaffold complete. See TODO.md for milestones. Full design rationale in docs/PLANNING.md.


Requirements

  • macOS (Apple Silicon or Intel, Metal-capable)
  • Rust 1.77+ (managed via rust-toolchain.toml)
  • Node.js 20+ and pnpm 9+ (corepack enable pnpm or brew install pnpm)
  • Xcode Command Line Tools (xcode-select --install)

Optional for distribution:

  • Apple Developer account (code signing, notarization)

Project layout

greedydots/
├── Cargo.toml                   workspace root
├── rust-toolchain.toml          pinned stable + components
├── crates/
│   ├── greedydots-core/         pure engine (no UI deps)
│   └── greedydots-cli/          command-line binary
├── src-tauri/                   Tauri 2 application
├── src/                         SolidJS frontend
├── palettes/                    bundled lospec palette JSON
├── test-images/                 regression test corpus
└── docs/PLANNING.md             design doc & decisions

First-time setup

# 1. Rust toolchain (auto-installed from rust-toolchain.toml on first cargo run)
cargo --version

# 2. Frontend deps
pnpm install

# 3. Tauri CLI — `pnpm exec tauri` works without global install.
#    Global install optional: `cargo install tauri-cli --version '^2.0'`

Development

Run engine tests

cargo test -p greedydots-core

Run CLI

# build + run
cargo run -p greedydots-cli -- convert test-images/sample.jpg out.png --preset storybook

# list presets
cargo run -p greedydots-cli -- presets

Run Tauri app (dev mode)

pnpm tauri:dev

This starts Vite at http://localhost:5173 and launches the Tauri window pointing at it. Rust and frontend hot-reload independently.

Build Tauri app (.app bundle)

pnpm tauri:build

Outputs .app / .dmg to src-tauri/target/release/bundle/.


Development workflow

  1. Work marches through milestones in TODO.md.
  2. Every new algorithm addition gets a test in the same module.
  3. Quality regressions are caught by SSIM comparison against golden outputs in test-images/golden/ (set up in M2).
  4. Performance regressions are caught by criterion benches (set up in M3).

Design principles (condensed)

  • Oklab color space for all distance math — dramatically better palette mapping.
  • Gamma-correct pipeline — sRGB → Linear → Oklab → ... → sRGB.
  • Edge-preserving quantization — Sobel mask forces silhouettes to darkest palette color.
  • GPU-first with CPU fallback — wgpu (Metal) for big wins, CPU for reliability.
  • Engine is UI-agnosticgreedydots-core knows nothing about Tauri.

See docs/PLANNING.md for the full document.


License

Dual-licensed under MIT OR Apache-2.0.

About

Pixel art creator from image

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors