https://github.com/omar-abdelgawad/string-art-app
Application for stringifying images to art.
https://github.com/omar-abdelgawad/string-art-app
html-css rust string-art tauri-app vanilla-javascript
Last synced: 11 months ago
JSON representation
Application for stringifying images to art.
- Host: GitHub
- URL: https://github.com/omar-abdelgawad/string-art-app
- Owner: omar-abdelgawad
- License: mit
- Created: 2024-04-25T03:58:57.000Z (about 2 years ago)
- Default Branch: website
- Last Pushed: 2025-05-25T01:50:55.000Z (about 1 year ago)
- Last Synced: 2025-05-25T02:42:53.806Z (about 1 year ago)
- Topics: html-css, rust, string-art, tauri-app, vanilla-javascript
- Language: Rust
- Homepage: https://omar-abdelgawad.github.io/string-art-app/
- Size: 398 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# String Art Generator
A tool that transforms images into string art using a greedy algorithm implemented in Rust, with both web and desktop interfaces.
## Project Structure
- `stringart/` - Core Rust package implementing the string art algorithm
- `wasm-stringart/` - WebAssembly bindings for the core algorithm
- `src-tauri/` - Tauri desktop application configuration
- `src/` - Frontend web application (vanilla JavaScript)
- `docs/` - GitHub Pages deployment files
## Deployment
### Desktop Application (Tauri)
The project uses Tauri to create a desktop application that combines the Rust backend with a web-based frontend:
```bash
# Build and run desktop app
npm run tauri dev
```
### Web Application (GitHub Pages)
The web version is automatically deployed to GitHub Pages using GitHub Actions:
1. The Rust backend is compiled to WebAssembly using `wasm-pack`
2. The web application in `docs/` directory uses the WebAssembly module
3. GitHub Actions automatically builds and deploys to GitHub Pages on push
## Development
### Prerequisites
- Rust toolchain
- Node.js
- wasm-pack
- Tauri dependencies
### Build Steps
1. Build WebAssembly module:
```bash
cd wasm-stringart
wasm-pack build
```
2. Run web version locally:
```bash
cd docs
npm start
```
3. Build desktop version:
```bash
npm run tauri build
```
## Architecture
- **Frontend**: Vanilla JavaScript with HTML Canvas for rendering
- **Backend**: Rust implementation of string art algorithm
- **Interfaces**:
- Desktop: Tauri-based application
- Web: WebAssembly compilation served via GitHub Pages