- Tauri v2 desktop shell with 1280x800 window - CanvasKit WASM (Skia) rendering via WebGL2 - Scene graph with typed nodes (Frame, Rectangle, Ellipse, Line, etc.) - Skia renderer with fills, strokes, rounded corners, opacity, rotation - Selection system with resize handles - Undo/redo manager (inverse command pattern with batching) - Bottom toolbar (Select, Frame, Rect, Ellipse, Line) matching Figma UI3 - Left layers panel, right properties panel - Pan (scroll), zoom (Ctrl+scroll toward cursor) - Keyboard shortcuts: V/F/R/O/L for tools, Cmd+Z undo, Backspace delete - 5 demo shapes rendered on canvas
15 lines
490 B
Rust
15 lines
490 B
Rust
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
|
#[tauri::command]
|
|
fn greet(name: &str) -> String {
|
|
format!("Hello, {}! You've been greeted from Rust!", name)
|
|
}
|
|
|
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
pub fn run() {
|
|
tauri::Builder::default()
|
|
.plugin(tauri_plugin_opener::init())
|
|
.invoke_handler(tauri::generate_handler![greet])
|
|
.run(tauri::generate_context!())
|
|
.expect("error while running tauri application");
|
|
}
|