Initial commit: agcanvas - interactive canvas for agent-human collaboration

- SVG paste from Figma with structure parsing (usvg)
- Element tree representation (groups, rects, paths, text, images)
- Canvas rendering with pan/zoom (egui + resvg + tiny-skia)
- WebSocket agent protocol on port 9876
- Semantic description generation
- Code generation stubs (React, HTML, Tailwind, Svelte, Vue)
- Cross-platform Rust implementation
This commit is contained in:
David Ibia
2026-01-22 21:01:15 +01:00
commit f466a6af93
16 changed files with 1523 additions and 0 deletions

51
Cargo.toml Normal file
View File

@@ -0,0 +1,51 @@
[package]
name = "agcanvas"
version = "0.1.0"
edition = "2021"
description = "Interactive canvas for agent-human collaboration with SVG support"
license = "MIT"
[dependencies]
# GUI
eframe = { version = "0.29", default-features = false, features = [
"default_fonts",
"glow",
"persistence",
] }
egui = "0.29"
egui_extras = { version = "0.29", features = ["image"] }
# SVG parsing and rendering
usvg = "0.44"
resvg = "0.44"
tiny-skia = "0.11"
# Clipboard
arboard = "3.4"
# Serialization (for agent protocol)
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Agent communication
tokio = { version = "1.0", features = ["rt-multi-thread", "sync", "macros"] }
tokio-tungstenite = "0.24"
futures-util = "0.3"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Image handling for texture conversion
image = { version = "0.25", default-features = false, features = ["png"] }
[profile.release]
opt-level = 3
lto = true
[profile.dev]
opt-level = 1